Adding a command button to open another spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

CAn anyone tell me the VBA for opening another spreadsheet if I place a
command button on my Spreadsheet so I can create an index page

Thanks Joel
 
Do you want to open a new sheet within your active workbook? Or do you want to open a new workbook?
 
Sub likeThis()
Workbooks.Open "C:\Book18.xls"
End Sub

Or, you can simply create hyperlinks to your workbooks instead of a
button for each one.
 
Hi

CAn anyone tell me the VBA for opening another spreadsheet if I place a
command button on my Spreadsheet so I can create an index page

Thanks Joel

Joel,

I recorded this macro.

Sub Add_Sheet()
Sheets.Add
End Sub

This is create a blank worksheet in a workbook. If you're looking for
another excel workbook then I don't know.
 
If in a new workbook use this code...


Sub NewSheet()
Application.Workbooks.Add
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top