Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling procedures from worksheet buttons
I have produced some code, which works perfectly and does exactly what I
want. The code uses the Workbook_open function and the main calls to other procedures runs from there. The issue I have, is I need to trigger the workbook_open function from an on screen button and I just cant work out how to do this, as it is saying sub / function not defined even though I have set the Workbook_open function to public. any help appreciated Anthony Taylor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling procedures from worksheet buttons
Cut out your Workbook_Open procedure into a Module. Call to the name of the
Sub from your Workbook_Open function and from your commandButton function. "Anthony" wrote in message ... I have produced some code, which works perfectly and does exactly what I want. The code uses the Workbook_open function and the main calls to other procedures runs from there. The issue I have, is I need to trigger the workbook_open function from an on screen button and I just cant work out how to do this, as it is saying sub / function not defined even though I have set the Workbook_open function to public. any help appreciated Anthony Taylor |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
calling procedures from worksheet buttons
Hi Anthony,
In addition to Eddie's solution., as you have declared the Workbook_Open sub public, you can call it from a button by prefixing the sub name with the module name, e.g.: Private Sub CommandButton1_Click() Call ThisWorkbook.Workbook_Open End Sub --- Regards, Norman "Anthony" wrote in message ... I have produced some code, which works perfectly and does exactly what I want. The code uses the Workbook_open function and the main calls to other procedures runs from there. The issue I have, is I need to trigger the workbook_open function from an on screen button and I just cant work out how to do this, as it is saying sub / function not defined even though I have set the Workbook_open function to public. any help appreciated Anthony Taylor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling Procedures in other Projects | Excel Programming | |||
Calling a macro in another worksheet | Excel Programming | |||
Calling procedures in .xla projects | Excel Programming | |||
Calling Procedures from another excel sheet by passing objects | Excel Programming | |||
Calling Procedures | Excel Programming |