Command Button to open File

  • Thread starter Thread starter Steved
  • Start date Start date
S

Steved

Hello from Steved

I would like please to have a Command Button.

I have over 300 files hence I will put a Command Button
for exch file on one spread sheet.

How does one go about this.

Thankyou.
 
Let me make sure I get what you are asking. You want a
spreadsheet that has a bunch of buttons so you press a
button in that spreadsheet and it opens other
spreadsheets? If that's the case you should just make
macros for each of those and then make buttons for each
macro. If you need help on making macros/buttons I would
recommend just doing a search in Excel for those words.
Hope this helps you out! Good luck!
 
If you use buttons from the forms toolbar, you can assign the same macro to
each, then test
Application.Caller
to see which button has been pressed.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Steve

Have you thought about creating a list of hyperlinks that will open the files?

Select a cell then right-click>hyperlink>link to>existing file.

Gord Dibben Excel MVP
 
Yes Gord I would very much like do it in this manner,
But each time the WEB TOOL BAR displays and I have no Idea
how to cancel it. Please advise me

Thankyou.
 
Steve

Need workbook_open code to disable the Toolbar.

Right-click on the Excel icon at top left of window and "View Code".
Copy/paste into there.

Private Sub Workbook_Open()
Application.CommandBars("Web").Enabled = False
End Sub

You could re-enable it in Before_Close code.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Web").Enabled = True
End Sub

Gord
 
Thankyou.
-----Original Message-----
Steve

Need workbook_open code to disable the Toolbar.

Right-click on the Excel icon at top left of window and "View Code".
Copy/paste into there.

Private Sub Workbook_Open()
Application.CommandBars("Web").Enabled = False
End Sub

You could re-enable it in Before_Close code.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Web").Enabled = True
End Sub

Gord



.
 
Back
Top