Results 1 to 10 of 10

How to use ActiveCell Adress in variable?

Threaded View

Castor77 How to use ActiveCell Adress... 05-11-2010, 10:03 AM
romperstomper Re: How to use ActiveCell... 05-11-2010, 10:04 AM
Castor77 Re: How to use ActiveCell... 05-11-2010, 10:12 AM
romperstomper Re: How to use ActiveCell... 05-11-2010, 10:15 AM
Castor77 Re: How to use ActiveCell... 05-11-2010, 10:18 AM
Marcol Re: How to use ActiveCell... 05-11-2010, 10:19 AM
Castor77 Re: How to use ActiveCell... 05-11-2010, 11:01 AM
romperstomper Re: How to use ActiveCell... 05-11-2010, 11:14 AM
Castor77 Re: How to use ActiveCell... 05-11-2010, 11:16 AM
Marcol Re: How to use ActiveCell... 05-11-2010, 11:28 AM
  1. #1
    Registered User
    Join Date
    05-11-2010
    Location
    Helsinki, Finland
    MS-Off Ver
    Excel 2007
    Posts
    5

    How to use ActiveCell Adress in variable?

    Hello Gurus!

    I've been pounding my head to the wall with an apparently simple problem. I need to store the adress of the ActiveCell in a variable and then use it in Range selection.

    Sounds easy but I just keep getting a global error message.

    I just need to select an area and copy it. Here is my code:

    Dim CellLoc As String
    
    Range("A1").Select
    Do
    ActiveCell.Offset(1, 0).Select
    Loop Until ActiveCell.Value = "Result"
    ActiveCell.Offset(-1, 7).Select
    CellLoc = ActiveCell.Address(False, False)
    Range("B17:CellLoc").Select *<--- The problem lies here
    From the immediate window I can see that CellLoc gets the value "I18" but when I try to use it in the range selection I get a global error message.

    Any tips are greatly appreciated!


    rgds,
    cas
    Last edited by Castor77; 05-11-2010 at 10:20 AM.

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