Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I call a workbook module in a worksheet module
Private Sub Commandbutton1_Click() My Code Then when complete call Sub Update() Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Commandbutton1_Click()
' My Code Update End sub or (less used) Private Sub Commandbutton1_Click() ' My Code Call Update() End sub -- Regards, Tom Ogilvy "Sandy" wrote in message ... How do I call a workbook module in a worksheet module Private Sub Commandbutton1_Click() My Code Then when complete call Sub Update() Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sandy,
In the worksheet's codemodule: Private Sub Commandbutton1_Click() 'Your code here Update End Sub In a regular module: Sub Update() 'Your other code here End Sub HTH, Bernie MS Excel MVP "Sandy" wrote in message ... How do I call a workbook module in a worksheet module Private Sub Commandbutton1_Click() My Code Then when complete call Sub Update() Thanks! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom Ogilvy wrote
Private Sub Commandbutton1_Click() ' My Code Call Update() End sub Using XL2000 at least, I've found that Call Update works without the '()', but I normally just use Update -- David |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since there are no arguments for the Update Sub, that is true. I was trying
to emphasize that if you use the CALL syntax, that the arguments must be enclosed in parentheses. Conversely, if you don't use call, they should not be enclosed in parentheses unless it is a function returning a value that is used by the calling program. -- Regards, Tom Oglvy "David" wrote in message ... Tom Ogilvy wrote Private Sub Commandbutton1_Click() ' My Code Call Update() End sub Using XL2000 at least, I've found that Call Update works without the '()', but I normally just use Update -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call Macro | Excel Discussion (Misc queries) | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
macro call | Excel Discussion (Misc queries) | |||
How to call a macro in an XLA add-in | Excel Discussion (Misc queries) |