Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2009, 03:35 AM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old October 16th, 2009, 10:48 AM
Registered User
 
Join Date: Jul 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Target is itself a Range object, so just remove the .Address part.
 
Old October 18th, 2009, 07:32 PM
Registered User
 
Join Date: Oct 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old October 19th, 2009, 02:34 AM
Registered User
 
Join Date: Jul 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using month & year variable to get date in range rsearing ASP.NET 2.0 Professional 2 July 5th, 2008 08:30 AM
NavigateUrl and Target spacy ASP.NET 1.x and 2.0 Application Design 9 November 5th, 2007 12:23 PM
Defining a Dynamic Range using a variable Alseikhan Excel VBA 0 March 27th, 2006 02:26 AM
target="_top" crmpicco HTML Code Clinic 3 March 23rd, 2005 12:50 PM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.