+ Reply to Thread
Results 1 to 9 of 9

Using current region

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Using current region

    Hello. If I use
    Please Login or Register  to view this content.
    does it change anything if A2:A3 are selected in the workbook?

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Using current region

    Range("A1").CurrentRegion is the same as select A1 and press Ctr+A
    and it does not depend on the current selection

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: Using current region

    I wonder why I'm getting an error then. Could you take a look?
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Using current region

    maybe so
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Using current region

    The only error I get with the code is to do with trying to duplicat a sheet name, not quite sure how that could be connected to CurrentRegion.
    If posting code please use code tags, see here.

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: Using current region

    Oops. I forgot to delete out some stuff. Try it out now. It errors on the part with your code.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: Using current region

    Also, no need to recode other parts of the code. They work just fine. The only piece that doesn't work is the code that you gave me previously.

  8. #8
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: Using current region

    I don't get it. I changed my code to this and it worked perfectly. But that was copying and pasting yours. When I try to just retype the changes in my original code it doesn't work. My original code is the second below.

    Please Login or Register  to view this content.

    Below is the same exact code (I think) but it's throwing back errors. It says "excel cannot complete this task with available resources. Choose less data or close other applications." Then it calculates and says "application defined or object defined error" on the offset part of the code.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: Using current region

    Figured it out. Forgot the .Rows and .Columns. Me so stupid.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Current Region through a function
    By Joakim N in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2014, 01:44 PM
  2. Assigning Current Region to a variable
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2009, 08:20 PM
  3. Using current.region less 1 column
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2009, 04:54 PM
  4. Replies: 1
    Last Post: 10-04-2007, 12:04 PM
  5. current region = name
    By by1612 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2007, 06:58 PM
  6. looping through current region
    By buffyslay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2006, 02:10 PM
  7. Assigning name to current region
    By KDJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2005, 12:05 PM

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