ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   question about custom button (https://www.excelbanter.com/excel-programming/288600-question-about-custom-button.html)

Locachica[_7_]

question about custom button
 
I have made a macro for my department mates to use. I wanted to make
custom button so when you click on it the macro is executed..

Ok so far I have put the button in a toolbar and attached it to th
macro... the problem I have is that when I click on it the macro fil
opens but this is not what I want, what I want is that when you clic
on it the macro is executed (but the file not opened)...

I have seen in another mate's PC such a custom button somebody els
installed (before I even started to work there) to print with a specia
format. The mate just needs to press the button and voila, it's done
In addition, the button has some text sth like "print ???format"

Does anybody know how to a) run the macro by just clicking on th
custom button (without opening macro??) b) write a text next to th
custom button icon?

THANKS!!

--
Message posted from http://www.ExcelForum.com


BrianB

question about custom button
 
You cannot run a macro without the file containing it being open.

It may seem that your mate can do this, but this is made possible b
:-
1. Perhaps the macro is contained in the workbook he is using.
2. Hiding the workbook that contains the macro when opened.

Most of us have a workbook called (by tradition, not necessity
personal.xls which contains our personal macros that we use all th
time. This is kept in our XLSTART folder so it automatically load
every time we open Excel. We set it to be hidden via Window/Hide (
prompt when closing Excel enables us to save it like that) - so w
never see it unless we want to

--
Message posted from http://www.ExcelForum.com


Locachica[_8_]

question about custom button
 
BrianB wrote:
*You cannot run a macro without the file containing it being open.

It may seem that your mate can do this, but this is made possible by
:-
1. Perhaps the macro is contained in the workbook he is using.
2. Hiding the workbook that contains the macro when opened.

*


Hello! thanks for your answer.

1. The macro is in another workbook and the button this mate has in her
toolbar is always there.

2. Hiding the workbook with the macro when opened.. how to do that? Is
this what you said of the personal.xls?

Thanks! :)


---
Message posted from http://www.ExcelForum.com/


BrianB

question about custom button
 
Locachica wrote:
*Hello! thanks for your answer.

1. The macro is in another workbook and the button this mate has i
her toolbar is always there.

2. Hiding the workbook with the macro when opened.. how to do that
Is this what you said of the personal.xls?

Thanks! :) *


1. The button may be there all the time, but the file it is attached t
must open before the macro can run.

2. Window/ Hid

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com