Open with command button

O

Owen Wilson

Hello,

I'm trying to use a command button on a form to open an
existing Excel spreadsheet. I can seem to get the code
right to open the application. Any suggestions?

TIA

Owen
 
T

Tom Ogilvy

Private Sub CommandButton1_click()
Workbooks.Open "C:\My Documents\MyFile.xls"
End Sub

or do you mean you are trying to do this in VB (the programming language)
rather than VBA in Excel.
 
Top