I have a code that works in the excel version 2010 normally, but in the 2013 version does not. Take a look.
Sub select_strategy()
'Subroutine that lets the user select a strategy table
'
'Declare local variables
Dim strategyFileDialog As Office.FileDialog
'Declare local variables
Dim intStrategySelection As Integer
'Initialize global variables
Call initialize_global_variables
' Allows the user to select the strategy table to use
Set strategyFileDialog = Application.FileDialog(msoFileDialogFilePicker)
With strategyFileDialog
.Title = "Select Strategy Table"
.InitialFileName = ActiveWorkbook.Path
.AllowMultiSelect = False
End With
intStrategySelection = strategyFileDialog.Show 'updates cell only if a file is selected
If intStrategySelection <> 0 Then
wsMain.Cells(2, 3) = strategyFileDialog.SelectedItems(1)
Else
wsMain.Cells(2, 3) = ""
End If
End Sub
The error for the 2013 version is Compile error: Cant find project or library. Any ideas how to solve it?