Popup box moving to new tab

M

Michele

Hi,

New to Macros, but have been picking up a bit here and there.

I'd like to create a msgbox for an interactive workbook where after a user
has opened the workbook, and then subsequently actives a specific sheet (only
the first time they do so in the workbook), they receive a dialog box
reminding them to 'Please remember to enter a,b,c for item 1,2,3 before
moving on'.

Example, they start on Sheet1, move to Sheet3, but then when the move to
Sheet2 they get the reminder.

They do not need to received the message again if the revisit Sheet2 before
they save/exit the workbook.

I'd like to display the same reminder on exiting the workbook.

Is this possible?

Thanks in advance!
Michele
 
M

Michele

Hi Simon,

Your working with a kindergarten coder here, so bear with me....

I copied and pasted your code exactly as you have it below:

Public SD As Integer Private Sub SheetViewed() SD = 0 End Sub Private Sub
Workbook_BeforeClose(Cancel As Boolean) MsgBox "Enter A,B,C in Items 1,2,3",
vbOKOnly, "Entry Reminder" SheetViewed End Sub Private Sub
Workbook_SheetActivate(ByVal Sh As Object) If ActiveSheet.Name = "Sheet2" And
SD <> 1 Then SD = 1 MsgBox "Enter A,B,C in Items 1,2,3", vbOKOnly, "Entry
Reminder" End If End Sub

When I try to use, I keep getting a dialog box --> Compile error: Expected:
end of statement -- and the word Private is highlighted.

Do I need to make certain modifications in places to the code? I did have
my ActiveSheet name = Sheet2

Sorry for being so dense...just trying to learn!

Thanks~
Michele
 
M

Michele

My hero!

When I was trying to correct the compile errors, I somehow ended up with an
extra End Sub at the beginning.

Thank you so much Simon!!
Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top