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.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Method Studios' title sequence for BBC series Taboo is truly unsettling

Best Pages for iOS tips | How to use Pages for iPad & iPhone: 6 simple tips to get more out of…