Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
Hello,
Can some one please direct me or explain how i can create a butto which runs a macro. I create a button whichs runs a macro on workbook. But what i want is to creat a button which contains the macr which then run on any sheet which is open. Is this possible if so how do i do it -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
A macro has to be stored in a workbook. Where it performs its actions is
dependent on how you write the macro. Even if you tie a macro to a button on the menus/commmandbars, it is stored in a workbook and if not already open, the workbook is opened and the macro run when the button is clicked. -- Regards, Tom Ogilvy "pauluk " wrote in message ... Hello, Can some one please direct me or explain how i can create a button which runs a macro. I create a button whichs runs a macro on a workbook. But what i want is to creat a button which contains the macro which then run on any sheet which is open. Is this possible if so how do i do it? --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
You cannot "contain a macro in a button".
The usual procedure is to have all the macros we use regularly in workbook called by tradition "personal.xls" - although it can have an name. We can have this open automatically when Excel starts by havin it in the Microsoft office/XLSTART folder. Normally we set it to b hidden with Window/Hide. If it is saved that way when Excel prompts a close-down it will stay hidden until Unhide -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
Paul,
You need to put it on the toolbar, and assign a macro. To make it generally available, I suggest you add to the Personal.xls file. The macro should work on the activeworkbook and activesheet. One for the code tips? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "pauluk " wrote in message ... Hello, Can some one please direct me or explain how i can create a button which runs a macro. I create a button whichs runs a macro on a workbook. But what i want is to creat a button which contains the macro which then run on any sheet which is open. Is this possible if so how do i do it? --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
Bob it may also be useful to add the following link to this refernece i
is to be placed on the tips part of the site As i think people would store certain macros in the personel.xls fil in order to use on other sheets\workbooks http://tinyurl.com/2gyv -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a macro to a button.
If it were, I think it would need elaborating on to make it more generic,
more useful. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "pauluk " wrote in message ... Bob it may also be useful to add the following link to this refernece if is to be placed on the tips part of the site As i think people would store certain macros in the personel.xls file in order to use on other sheets\workbooks http://tinyurl.com/2gyvn --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding a Button | Excel Discussion (Misc queries) | |||
Adding Macro to Button on WOrksheet | Excel Discussion (Misc queries) | |||
Programmatically Adding Controls (Macro) eg Button on A SpreadSheet | Excel Programming | |||
Adding a button | Excel Programming | |||
adding button for add-in | Excel Programming |