Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a small problem with a macro. I have two different moduls in my code.
In module1 i have the code for some buttons and so and in module2 i have the code for what happens if i press the buttons. However my code has trouble finding the different modules and I need help on how to write this properly. Code in module1: Sub Create_Menu() Dim MyBar As CommandBar Dim MyPopup As CommandBarPopup Dim button1 As CommandBarButton ...... Set button1 = .Controls.Add(Type:=msoControlButton) With button1 .Caption = "Button!" ..BeginGroup = True .OnAction = "button1_Click" and in modul2: Sub button1_Click() Dim objChart As ChartObject Now I need help with how to refer to the sub. My code is quite messy if i have to have it in the same module so it would be prefect it that was possible. Thanks very much in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calling worksheet module from other module. | Excel Programming | |||
code in module A to not execute a Worksheet_SelectionChange sub of another module | Excel Discussion (Misc queries) | |||
Run worksheet module code from workbook module? | Excel Programming | |||
Calls from sheet module to ThisWorkbook module | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |