Macro which wil run other workbooks?any1 knows the code plea

Mayk

New Member
Joined
Mar 18, 2002
Messages
18
I have three following worsheets:
welcomepage.xls
as~project~witoutpics1.xls
database~as212.xls

These files are located on my desktop.
In the welcom page i have a button which i want in a way that after i click on it two other worksheets opens.

The example below is the macro i recorded using key strokes however is is not working.
Anyone knows an alternative please help.

Sub ENTERTOMAINMENU_BUTTON()
'
' ENTERTOMAINMENU_BUTTON Macro
' Macro recorded 11/04/2002 by Radek Ilendo
'

'
Windows("As~project~witoutpics.xls").Activate
Range("G4").Select
Sheets("Main menu").Select
End Sub
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
you said you want worksheets to open, do you mean the other workbooks? if so, heres the code to open a workbook:

Workbooks.Open Filename:="C:PathFileName.xls"
 
Upvote 0

Forum statistics

Threads
1,221,519
Messages
6,160,294
Members
451,636
Latest member
ddweller151

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top