+ Reply to Thread
Results 1 to 3 of 3

VBA - Passing Cell Location To Variable

  1. #1
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236

    Question 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

  2. #2
    Gary Keramidas
    Guest

    Re: VBA - Passing Cell Location To Variable

    see if maybe creating a dynamic range will help you

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

    --


    Gary


    "ajocius" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236

    Question

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1