Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Passing Cell Location To Variable


Group,
Lets assume I'm working in a spreadsheet that changes weekly.
There are numerous calculations, and a cell is selected. How do I
pass the cells location, for example B7 into a variable? This week the
location can be B7, but next week it could be B9. I don't know the
location after I run the macro presently. That is why I want to pass
it to a variable for later use. Its probably very simple, but for a
novice its pretty tough. TIA.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=472859

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default VBA - Passing Cell Location To Variable

see if maybe creating a dynamic range will help you

http://www.contextures.com/xlNames01.html

--


Gary


"ajocius" wrote in
message ...

Group,
Lets assume I'm working in a spreadsheet that changes weekly.
There are numerous calculations, and a cell is selected. How do I
pass the cells location, for example B7 into a variable? This week the
location can be B7, but next week it could be B9. I don't know the
location after I run the macro presently. That is why I want to pass
it to a variable for later use. Its probably very simple, but for a
novice its pretty tough. TIA.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile:
http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=472859



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Passing Cell Location To Variable


Not what I'm looking for. Assume my active cell is someplace(location
unknown). But at some point in my macro I need to put its location
into a variable for use later in the macro. How do I pass that
location to the variable?

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=472859

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 to set up a simple variable in Excel, but cell location independent Alberta K. New Users to Excel 3 December 19th 07 03:55 PM
how to set up a simple variable in Excel, but cell location independent Alberta K. Excel Worksheet Functions 3 December 19th 07 03:55 PM
Passing variable to VarType of other Variable ExcelMonkey[_190_] Excel Programming 3 February 22nd 05 01:38 PM
Passing variable from one sub to another Medemper Excel Programming 0 February 26th 04 10:23 PM
using variable as cell location Brad[_14_] Excel Programming 5 January 5th 04 07:17 PM


All times are GMT +1. The time now is 05:13 AM.

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"