Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pop up warning | Excel Discussion (Misc queries) | |||
warning box | Excel Worksheet Functions | |||
Sort warning | Excel Discussion (Misc queries) | |||
Date Warning | Excel Discussion (Misc queries) | |||
Warning!!! | Excel Worksheet Functions |