Open with command button

  • Thread starter Thread starter Owen Wilson
  • Start date Start date
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
 
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.
 
Back
Top