+ Reply to Thread
Results 1 to 3 of 3

dim range as Range

  1. #1
    Registered User
    Join Date
    09-09-2010
    Location
    Haugesund, Norway
    MS-Off Ver
    Excel 2003
    Posts
    33

    dim range as Range

    Hi,

    I was needed one variable as Range and I tried to call it range, but when I wrote

    Please Login or Register  to view this content.
    then debugger fixed it to

    Please Login or Register  to view this content.
    it changed "R" to "r" and it changed all my ranges (f.e. Sheet("..").Range("...") to variable range and I can't go back, can't set back to Range object not range variable. When I try to Write "R" instead of "r", debugger fixes it back to "r". So now I do not have Range object, just range as variable.

    Hope you understand what I mean..

    Any ideas how to fix this problem?

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: dim range as Range

    Don't use reserved words as varaible names. Call your range something else and your problems will be magically fixed.

  3. #3
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: dim range as Range

    Yes, don't call your variable Range!

+ 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