Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I will be grateful for any ideas any one has on the following.
I have a long macro that when run sometimes calls the message box as below and sometimes does not. I have tried including it in the macro code and also tried calling it (ie having it separate) and the only way i can make it work every time is to in effect stop the macro by putting another message box before it such as 'msgbox "xyz" ' this has the effect of stopping the macro and it runs every time. As you will note it is a basic message box. Code as below Public hols As Boolean( i actually declare this at the top with other public declarations) Dim Msg, Style, Title, holiday Msg = "Was yesterday a holiday ?" Style = vbYesNo Title = "Holiday?" holiday = MsgBox(Msg, Style, Title) If holiday = vbYes Then hols = True If holiday = vbNo Then hols = False This then sets the hols variable to true or false. -- with kind regards Spike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
what is this called? : < | Excel Worksheet Functions | |||
What is this function called?? | Excel Discussion (Misc queries) | |||
How can a UDF be called from a formula? | Excel Worksheet Functions | |||
Run Workbook_Open only if called | Excel Programming | |||
Possible to know who has called a function ? | Excel Programming |