Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Button Bob Barnes Excel Discussion (Misc queries) 2 June 30th 08 07:36 PM
Adding Macro to Button on WOrksheet Barb Reinhardt Excel Discussion (Misc queries) 1 January 21st 06 02:29 PM
Programmatically Adding Controls (Macro) eg Button on A SpreadSheet Martin SChukrazy Excel Programming 0 March 7th 04 06:01 AM
Adding a button pauluk[_12_] Excel Programming 1 March 3rd 04 06:28 PM
adding button for add-in jason Excel Programming 0 October 1st 03 10:21 PM


All times are GMT +1. The time now is 06:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"