Excel VBA code

  VNAM75 12:36 22 Jan 07

I need a code to link to a button on a spreadsheet which when pressed opens up a file. Eg C:\Document Files\Document1.

  VoG II 12:51 22 Jan 07

Sub Select_A_File()
Dim sFile
sFile = Application.GetOpenFilename("Files (*.xls),*.xls", , "Select A File")
If sFile = "False" Then
MsgBox "No file selected. Activity halted."
End If
Workbooks.Open (sFile)
End Sub

  VNAM75 12:57 22 Jan 07

VoG™ thanks.

This thread is now locked and can not be replied to.

Surface Pro (2017) vs Surface Pro 4

Where HTML5 is headed next

MacBook Pro v Surface Pro 5