LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Range Reference in Visual Basic

Hi:

I have the following worksheet based macro in VBA:


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$F$5" Then
Run "buttonchange"
End If
End Sub

I want to expand the target address to F5 OR F6, and have no idea how to do it. Whatever I
try $F$5:$F$6, $F$5 OR $F$6 or a myriad of variations around that come up with a compile
error OR don't work!

Anyone got any thoughts on this?

Regards
John Baker
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Range not equal to zero in Visual Basic If/Then statement Clinton W Excel Discussion (Misc queries) 3 May 2nd 09 11:17 PM
Visual Basic to reference value in Excel cell Raymond[_4_] Excel Programming 1 October 28th 03 08:24 PM
Visual Basic Range variable Andrew Johnson Excel Programming 2 August 25th 03 05:18 PM
Visual basic to step through range and store a value based on text attribute value. Bob Phillips[_5_] Excel Programming 1 August 8th 03 02:50 PM
Visual basic to step through range and store a value based on text attribute value. Bob Kilmer Excel Programming 0 August 7th 03 09:46 PM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"