Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A msgbox appears on sheet level once, and only once
I want to put a note by Worksheet_SelectionChange on a worksheet, like
msgbox, to warn the users when they activate that sheet. But I want that note appears only once, that is, the first time after the workbook is open and the worksheet is clicked. I do not want to see that every time the user returns the that worksheet, he is annoyed. Any ideas? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A msgbox appears on sheet level once, and only once
add a variable on modul level then
in workbooks open event set its value that would store info about msgbox appearence (e.g. string variable set to "N") - after selection you will check wheather this value is set to "N" - if so the msg appear and the value of that variable would be changed to "Y" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
A msgbox appears on sheet level once, and only once
Same basic idea as Snake, but I would declare a Boolean (true/false) variable
in the code module for the sheet in question, and I would use the Worksheet_Activate event rather than Worksheet_SelectionChange. Dim BeenHere As Boolean Private Sub Worksheet_Activate() If IsNull(BeenHere) Then BeenHere = False End If If BeenHere = False Then MsgBox "First time" BeenHere = True End If End Sub Hope this helps, Hutch "Snake Plissken" wrote: add a variable on modul level then in workbooks open event set its value that would store info about msgbox appearence (e.g. string variable set to "N") - after selection you will check wheather this value is set to "N" - if so the msg appear and the value of that variable would be changed to "Y" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
INDIRECT with Sheet Level Defined Name | Excel Worksheet Functions | |||
unprotect a sheet that appears to be unprotected already | Excel Worksheet Functions | |||
If a worksheet name is = to test then a msgbox appears | Excel Discussion (Misc queries) | |||
Unwanted bar appears at the top of the sheet | Excel Programming | |||
Why, when I create workbook-level name does it jump it to Sheet-level ? | Excel Programming |