Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
I am trying to get an Excel macro to run from any workbook by placing a
button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
I'm not sure what you are trying to do. You only need DLL decarations if you
are running a compiled code usually an .exe file or some other executable. VBA macros are not executables. So if you are running a macro from any microsoft office product to any other microsoft office product yo udon't need any declarations. VBA (Visual Basic) macro can either be placed in every workbook which is the normal method for executing a macro. When you copu a workbook the macro is automatically copied. You can also run a macro in another workbook (or a macro in another microsoft office product). Is your question how to run a macro in another workbook? "Bugzee" wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
Thanks very much for your help, Joel. What I am trying to achieve is to have
a macro to set my default formats for a type of report. I would like this macro to be accessible from any workbook. Any advice on how this can be done? Thanks, Bugzee "joel" wrote: I'm not sure what you are trying to do. You only need DLL decarations if you are running a compiled code usually an .exe file or some other executable. VBA macros are not executables. So if you are running a macro from any microsoft office product to any other microsoft office product yo udon't need any declarations. VBA (Visual Basic) macro can either be placed in every workbook which is the normal method for executing a macro. When you copu a workbook the macro is automatically copied. You can also run a macro in another workbook (or a macro in another microsoft office product). Is your question how to run a macro in another workbook? "Bugzee" wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
I you are the only one who is going to use this macro then yo may consider
putting the macro in a personal.xls workbook. The personal workbook macros will be available to you whenever you open up any workbook. "Bugzee" wrote: Thanks very much for your help, Joel. What I am trying to achieve is to have a macro to set my default formats for a type of report. I would like this macro to be accessible from any workbook. Any advice on how this can be done? Thanks, Bugzee "joel" wrote: I'm not sure what you are trying to do. You only need DLL decarations if you are running a compiled code usually an .exe file or some other executable. VBA macros are not executables. So if you are running a macro from any microsoft office product to any other microsoft office product yo udon't need any declarations. VBA (Visual Basic) macro can either be placed in every workbook which is the normal method for executing a macro. When you copu a workbook the macro is automatically copied. You can also run a macro in another workbook (or a macro in another microsoft office product). Is your question how to run a macro in another workbook? "Bugzee" wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
Thanks again Joel. But what if I wanted to make the macro available to others
in my office? Thanks. Bugzee "joel" wrote: I you are the only one who is going to use this macro then yo may consider putting the macro in a personal.xls workbook. The personal workbook macros will be available to you whenever you open up any workbook. "Bugzee" wrote: Thanks very much for your help, Joel. What I am trying to achieve is to have a macro to set my default formats for a type of report. I would like this macro to be accessible from any workbook. Any advice on how this can be done? Thanks, Bugzee "joel" wrote: I'm not sure what you are trying to do. You only need DLL decarations if you are running a compiled code usually an .exe file or some other executable. VBA macros are not executables. So if you are running a macro from any microsoft office product to any other microsoft office product yo udon't need any declarations. VBA (Visual Basic) macro can either be placed in every workbook which is the normal method for executing a macro. When you copu a workbook the macro is automatically copied. You can also run a macro in another workbook (or a macro in another microsoft office product). Is your question how to run a macro in another workbook? "Bugzee" wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
This doesn't have anything to do with DLLs.
And since you're sharing with others, don't share a workbook named personal.xls. Excel only allows one workbook with that name to be open in any particular instance. If the recipients have their own personal.xls workbook, then they'll have to close that file and open yours. Instead create a new utility workbook that contains all your macros. Name it BugZeeUtils.xls and tell them to save it in a particular location on their harddrive (like: C:\ExcelUtilities\bugzeeutils.xls This file can have code that creates the button on the toolbar when it opens and removes the button when it closes. For additions to the worksheet menu bar, I really like the way John Walkenbach does it in his menumaker workbook: http://j-walk.com/ss/excel/tips/tip53.htm Here's how I do it when I want a toolbar: http://www.contextures.com/xlToolbar02.html (from Debra Dalgleish's site) In xl2007, those toolbars and menu modifications will show up under the addins. And if you use xl2007: If you want to learn about modifying the ribbon, you can start at Ron de Bruin's site: http://www.rondebruin.nl/ribbon.htm http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an addin) or http://www.rondebruin.nl/2007addin.htm Bugzee wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic Link Library
Thanks very much guys. You have been very helpful.
Kind regards Bugzee "Dave Peterson" wrote: This doesn't have anything to do with DLLs. And since you're sharing with others, don't share a workbook named personal.xls. Excel only allows one workbook with that name to be open in any particular instance. If the recipients have their own personal.xls workbook, then they'll have to close that file and open yours. Instead create a new utility workbook that contains all your macros. Name it BugZeeUtils.xls and tell them to save it in a particular location on their harddrive (like: C:\ExcelUtilities\bugzeeutils.xls This file can have code that creates the button on the toolbar when it opens and removes the button when it closes. For additions to the worksheet menu bar, I really like the way John Walkenbach does it in his menumaker workbook: http://j-walk.com/ss/excel/tips/tip53.htm Here's how I do it when I want a toolbar: http://www.contextures.com/xlToolbar02.html (from Debra Dalgleish's site) In xl2007, those toolbars and menu modifications will show up under the addins. And if you use xl2007: If you want to learn about modifying the ribbon, you can start at Ron de Bruin's site: http://www.rondebruin.nl/ribbon.htm http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an addin) or http://www.rondebruin.nl/2007addin.htm Bugzee wrote: I am trying to get an Excel macro to run from any workbook by placing a button on the menu bar. I do not know which DLL to include in the Public Declaration. Can anyone advise me? Thanks. Bugzee -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Extensibility library and dynamic code compilation | Excel Programming | |||
DDE link cache in DDEML library - is it so? | Excel Programming | |||
how do i create an import library to link to a dll for use in exc. | Excel Programming | |||
how to write dynamic link library for excel to use? | Excel Programming | |||
how to write dynamic link library for excel to use? | Excel Programming |