Visual Basic:Change on event

B

brujolito

I wish to reset the properties of several worksheet controls on the
entry into a cell. The visual basic help suggests using

Sub Worksheet_Change(ByVal Target as Range)


End Sub

What is the syntax to be used here is it

Sub Worksheet_Change(ByVal .Range("C11"))?

or Sub Worksheet_Change(ByVal .Range("C11") as Range)?

Sub Worksheet_Change(ByVal ("C11") as Range)?

I am using Excel 2004 on OSX 10.4

Thanks Brujolito
 
D

Don Guillett

put in the SHEET module
private Sub Worksheet_Change(ByVal Target as Range)
if target.address="$A$11" then
do your thing
end if
End Sub
 

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

Top