Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
XLA function called twice
I've written a few routines in an XLA to check the compare the content of
two user-selected worksheets - part of our data verifcation system. The routine asks user to select an open workbook from a combo-box on a userForm (list is populated before opening form). User then chooses required sheet from a listbox on same form. This works fine when test in VBA editor by entering function in Debug [e.g. ?GetSheetName() ]. The function is in a class module in the XLA and is Public. I've now assigned the function to a button on a new menu and the correct form is displayed so the user can select sheet as required. Problem is, it then appears for a second time and asks the user again - as if the function is being called twice. I've check with a very basic function (as below) and still get the 'double' call. === Public Function Isvalid() As Boolean Static intRun As Integer intRun = intRun + 1 MsgBox "isvalid", vbOKOnly, intRun End Function === This shows two succesive mesage boxes with caption of 1 then 2. New button in Excel has call to function =IsValid() (Win 98 + Office97) Any ideas what's causing this ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I know which cell a function is called from? | Excel Worksheet Functions | |||
What is this function called?? | Excel Discussion (Misc queries) | |||
Function, dont know what its called | Excel Worksheet Functions | |||
Possible to know who has called a function ? | Excel Programming | |||
How do I find which cell called a function? | Excel Programming |