p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Excel VBA > Excel VBA
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 15th, 2009, 04:35 AM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 16th, 2009, 11:48 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Target is itself a Range object, so just remove the .Address part.
__________________
HTH
R.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 18th, 2009, 08:32 PM
Registered User
Points: 17, Level: 1
Points: 17, Level: 1 Points: 17, Level: 1 Points: 17, Level: 1
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old October 19th, 2009, 03:34 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
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.
__________________
HTH
R.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

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 09: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



All times are GMT -4. The time now is 01:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc