Excel VBA code

  VNAM75 12:36 22 Jan 2007
Locked

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 2007

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
End If
Workbooks.Open (sFile)
End Sub

  VNAM75 12:57 22 Jan 2007

VoG™ thanks.

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

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

See mcbess's iconic style animated for Mercedes-Benz

iPhone X news: Release date, price, new features & specs

Black Friday 2017 : date, sites participants & bonnes affaires