Command Button to open File

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.
 
G

Guest

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!
 
B

Bob Phillips

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)
 
G

Gord Dibben

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
 
S

Steved

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.
 
G

Gord Dibben

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
 
S

Steved

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



.
 

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

Top