#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default Worksheet Warning

Hello I have a workbook that has a form to be completed by employees. I
want to create a warning that whenever the "Form" worksheet is selected, the
following statement will appear "Make sure that you have answered question 1
on the Agreement Tab. I tried validation but that only works if a cell i s
selected.
thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default Worksheet Warning

Alright, follow these steps, this should work if I understand what you mean
by form. Because I automatically think of a form as one being created in the
VBE but im assuming this is a form on an actual excel sheet.

1) Go to your worksheet with the form on it
2) Go to Tools--Macro--Visual Basic Editor
3) On the left side you should see the Project Explorer that has your
workbook name and the sheets on it. If not go to View-- Project Explorer
4) In the project explorer double click on the sheet with the form
5) A blank module should pop up. In that module you should see a drop down
box in the upper left that says (General). Change this to Worksheet
6) In the upper right you should see something that says SelectionChange.
Change this to Activate
7) Between the lines that say Private Sub Worksheet_Activate() and End Sub
type in

MsgBox "Your message here", vbCritical

8) You can delete the lines that say Private Sub
Worksheet_SelectionChange(ByVal Target as Range) and End Sub

So all that should be in the module is

Private Sub Worksheet_Activate()
MsgBox "Your message here", vbCritical
End Sub

Then save, close out and test it out on your form sheet

"Wanna Learn" wrote:

Hello I have a workbook that has a form to be completed by employees. I
want to create a warning that whenever the "Form" worksheet is selected, the
following statement will appear "Make sure that you have answered question 1
on the Agreement Tab. I tried validation but that only works if a cell i s
selected.
thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default Worksheet Warning

Thank you! Excellent instructions

"akphidelt" wrote:

Alright, follow these steps, this should work if I understand what you mean
by form. Because I automatically think of a form as one being created in the
VBE but im assuming this is a form on an actual excel sheet.

1) Go to your worksheet with the form on it
2) Go to Tools--Macro--Visual Basic Editor
3) On the left side you should see the Project Explorer that has your
workbook name and the sheets on it. If not go to View-- Project Explorer
4) In the project explorer double click on the sheet with the form
5) A blank module should pop up. In that module you should see a drop down
box in the upper left that says (General). Change this to Worksheet
6) In the upper right you should see something that says SelectionChange.
Change this to Activate
7) Between the lines that say Private Sub Worksheet_Activate() and End Sub
type in

MsgBox "Your message here", vbCritical

8) You can delete the lines that say Private Sub
Worksheet_SelectionChange(ByVal Target as Range) and End Sub

So all that should be in the module is

Private Sub Worksheet_Activate()
MsgBox "Your message here", vbCritical
End Sub

Then save, close out and test it out on your form sheet

"Wanna Learn" wrote:

Hello I have a workbook that has a form to be completed by employees. I
want to create a warning that whenever the "Form" worksheet is selected, the
following statement will appear "Make sure that you have answered question 1
on the Agreement Tab. I tried validation but that only works if a cell i s
selected.
thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop up warning Michael Excel Discussion (Misc queries) 0 January 16th 08 04:02 PM
warning box delete automatically Excel Worksheet Functions 3 October 20th 07 03:31 PM
Sort warning ChauBer Excel Discussion (Misc queries) 1 January 13th 07 06:21 PM
Date Warning smack Excel Discussion (Misc queries) 2 November 28th 06 02:46 PM
Warning!!! Paul Excel Worksheet Functions 6 August 2nd 05 05:58 PM


All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"