form creation

  • Thread starter Thread starter Peter Bailey
  • Start date Start date
P

Peter Bailey

I would like to have a small form pop up or msgbox that pops up when the
user is in a particular column so I can show error entry codes. I am not
sure of how to achieve this, it must detect that the user changed the column
and then show entry data permissable for that row.

Advice much appreciated.

Regards
Peter
 
Peter,

This may get a bit annoying every time anyone goes into that column!

But this code will do it for column 3, C
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 3 Then
MsgBox "yourmessage"
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Data Validation will do the pop-ups for you. You set the criteria and the
message. On the menu select Data/Validation.

Mike F
 

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

Back
Top