#1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Range

Hello,

Is there a better way to start this if statement - it is
not working for me

If ActiveCell.Address = Range("$a$f1278").Address Then
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Range

hard to tell. $a$f1278 isn't a valid address you could mean

af1278
a1278
f1278

You don't need $ in VBA for an argument to Range

You could do

If ActiveCell.Address = "$AF$1278" then

You do need the dollar signs here because the comparison is to a string that
would match the results of the Address argument.

--
Regards,
Tom Ogilvy

wrote in message
...
Hello,

Is there a better way to start this if statement - it is
not working for me

If ActiveCell.Address = Range("$a$f1278").Address Then



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Range

Hi

Do you mean
If ActiveCell.Address = Range("$af$1278").Address Then

--
XL2002
Regards

William



wrote in message
...
| Hello,
|
| Is there a better way to start this if statement - it is
| not working for me
|
| If ActiveCell.Address = Range("$a$f1278").Address Then


  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Range

Thank You

That's my problem I typed it incorrectly



-----Original Message-----
hard to tell. $a$f1278 isn't a valid address you

could mean

af1278
a1278
f1278

You don't need $ in VBA for an argument to Range

You could do

If ActiveCell.Address = "$AF$1278" then

You do need the dollar signs here because the comparison

is to a string that
would match the results of the Address argument.

--
Regards,
Tom Ogilvy

wrote in message
...
Hello,

Is there a better way to start this if statement - it is
not working for me

If ActiveCell.Address = Range("$a$f1278").Address Then



.

Reply
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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


All times are GMT +1. The time now is 04:34 PM.

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

About Us

"It's about Microsoft Excel"