Hi,
Use the Workbook Open event and add
Sheet1.Activate
where Sheet1 is the VBA code name of the sheet containing your buttons. This will force the buttons sheet to be the active sheet when the workbook is opened.
If you use an Activex button, i.e. Developer, Insert (in the Controls area of the ribbon), add an activex button
You can then right click on the button and in the 'View Code' Button Click procedure which opens add a line of code
Sheet2.Activate
In this case Sheet2 is the VBA sheet code name and it may be the same as the sheet tab name. However since people can change tab names it's best to use the VBA code name all the time.
You could use
Sheets("Sheet2").Activate
syntax but if the sheet name is changed then the macro won't work.
You could instead use any other shape or picture object and in the Visual Basic area at the Module level add a new procedure - say
and in the right click event of the button shape/picture object pick 'Assign macro' and select the 'MyButton1' macro
Bookmarks