View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Pop up verification when opening a sheet.

So change the code in the ThisWorkbook module to

Private Sub Workbook_Open()
CheckCorrectSheet
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
CheckCorrectSheet
End Sub

Private Sub CheckCorrectSheet()
Const csMsg As String = _
"Are you sure you want to Enter data on " & _
vbNewLine & vbNewLine & " "
MsgBox csMsg & ActiveSheet.Name & " ?"
End Sub

In article .com,
" wrote:

Many thanks for the reply - not sure if I explained well enough, but I
want the pop up to appear every time you click another sheet, and not
just when you open the Workbook - which this seems to do.
The reason is that we've had people enter data on incorrect sheets and
this will be a visible reminder to them to select the correct sheet
before entering data.