Hi,
when I tried the procedure below, I got the error 'Method or data object not found' on 'GetOpenFilename'. What did I do wrong?
Private Sub command5_Click()
Dim varRetVal As Variant
varRetVal = Application.GetOpenFilename( _
FileFilter:="Microsoft Excel-files(*.xls), *.xls", _
Title:="a file to open")
If varRetVal = False Then Exit Sub
On Error Resume Next
Workbooks.Open FileName:=varRetVal
On Error GoTo 0
End Sub