View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson[_4_] Greg Wilson[_4_] is offline
external usenet poster
 
Posts: 218
Default code for showing userform on cell selection

Paste the following to the code module pertaining to the
worksheet involved:

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
Select Case Target.Address
Case "$A$1", "$C$2", "$D$5"
UserForm1.Show
Case Else
Unload UserForm1
End Select
End Sub

Regards,
Greg

-----Original Message-----
Hi
I want to have a userform show up on selection of

specified cells (say A1,
C2 and D5) and the userform to disappear when the

selection is moved to
other cells. Could someone please suggest a code for this?
Thanks in advance

M P Reddy
--




.