Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm using data validation on one cell, say C19. Is there a pre-defined event
that we can use so that when there is a change on this specific cell it will prompt the user for a password? I'm new, I already have this code: (but it's not working) Private Sub Worksheet_Change(ByVal C19 As Range) Set pass = Application.InputBox(prompt:="Enter a Password", Type:=2) End Sub I found events only on workbook and worksheet but nothing on a specific cell. Do you think this is possible? Help! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Check VBA help for the Intersect method. Maybe you are looking for something
along the lines of: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Me.Range("C19")) Is Nothing Then pass = Application.InputBox(prompt:="Enter a Password", Type:=2) If pass < YourPassword Then Application.Undo End If End Sub "Sashi" wrote: I'm using data validation on one cell, say C19. Is there a pre-defined event that we can use so that when there is a change on this specific cell it will prompt the user for a password? I'm new, I already have this code: (but it's not working) Private Sub Worksheet_Change(ByVal C19 As Range) Set pass = Application.InputBox(prompt:="Enter a Password", Type:=2) End Sub I found events only on workbook and worksheet but nothing on a specific cell. Do you think this is possible? Help! |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
It worked, thank you so much! :)
|
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome. Thanks for the feedback.
"Sashi" wrote: It worked, thank you so much! :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change the width of a specific cell | Excel Worksheet Functions | |||
change event on specific cell rather than worksheet | Excel Discussion (Misc queries) | |||
Event macro that targets specific worksheet | Excel Discussion (Misc queries) | |||
cell change event | Excel Worksheet Functions | |||
cell value change event | Excel Worksheet Functions |