|
|
 |
| Excel VBA Discuss using VBA for Excel programming. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Excel VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 15th, 2009, 04:35 AM
|
|
Registered User
|
|
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
name target.address to a range variable
I WANT TO WORK OFF THE TARGET.ADDRESS FROM A WORKSHEET_CHANGE EVENT. SOMETHING LIKE: TARGET.ADDRESS.OFFSET(0,4) = MYRANGE....MY INTENTION IS TO USE THIS VARIABLE AS THE CELL ADDRESS IN A FEW CUSTOM VALIDATION FORMULAS.
I HAVE COLUMN "B" AS THE TARGET >
IT CONTAINS A DROP DOWN LIST WITH (8) CHOICES>
DEPENDING ON THE CHOICE(TARGET.VALUE )THE CUSTOM VALIDATION FORMULA WILL CHANGE IN COLUMN "F" OF THE SAME ROW.
THE SHORT OF IT IS THE VALIDATION FORMULAS CELL ADDRESS'S MUST NOT BE STATIC.
THANKS
|

October 16th, 2009, 11:48 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Target is itself a Range object, so just remove the .Address part.
__________________
HTH
R.
|

October 18th, 2009, 08:32 PM
|
|
Registered User
|
|
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
solution reply
Thanks, But it didnt like that either. I know when I extend my code to place the target.address into a cell it will :$b$1 for exp. and it changes relative to the any of the target's cell's activation. But it won't let me use in anything else.
Thanks Again
Steve
|

October 19th, 2009, 03:34 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hard to be specific without knowing what you actually tried or how it failed, but Target is a range object, so if you need to offset, you have to offset from Target, not from its address property:
Code:
target.offset(,4).address
for example.
__________________
HTH
R.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |