View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default update details using vba

The .address property has an option that allows you to include those dollar
signs or not.

If you don't want them:
if Target.Address(rowabsolute:=False, columnabsolute:=False) = "G26" then

or simply:
if Target.Address(0,0) = "G26" then

(False and 0 will be treated the same)


Shatin wrote:

Works on my computer. But Shaun, why must the address be "$G$26" and can't
be simply "G26"?

Thanks!

"Noemi" wrote in message
...
Hi Shaun
It did not help, still nothing happens.

Any other suggestions.

Thanks
Noemi

"ShaunM" wrote:


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile:

http://www.excelforum.com/member.php...o&userid=18610
View this thread:

http://www.excelforum.com/showthread...hreadid=479018



--

Dave Peterson