Thread: calling a macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default calling a macro

Why not make a floating toolbar/commandbar with a single button that
activates sheet1.

Create the toolbar in the workbook_Open event and destroy it in the
workbook_BeforeClose event:

Here is an article about creating commandbars with code:
http://msdn.microsoft.com/library/techart/ofcmdbar.htm

Chip Pearson's page on Events:
http://www.cpearson.com/excel/events.htm

More on CommandBars:
http://support.microsoft.com/default...02&Product=xlw
How to customize menus and menu bars in Excel

http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for writing
Visual Basic(R) for Applications code to customize menus in Microsoft Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.

--
Regards,
Tom Ogilvy


"jhahes" wrote in
message ...

How do I call a macro, for instance I have 50 sheets on every sheet I
want to put a command button to go back to the main page (Sheet1). How
do I create one macro that goes Sheet1.activate and be able to call that
to run. I am new to the terminology of vba. Do I have to create a new
module or put it in this workbook?

Thanks for any help


--
jhahes
------------------------------------------------------------------------
jhahes's Profile:

http://www.excelforum.com/member.php...o&userid=23596
View this thread: http://www.excelforum.com/showthread...hreadid=392594