+ Reply to Thread
Results 1 to 10 of 10

Resetting ActiveSheet.Range macro

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    Warsaw
    MS-Off Ver
    Excel 2010
    Posts
    97

    Resetting ActiveSheet.Range macro

    Hi,
    I've got one probably simple problem, but can't think of any solution, I used following macro:
    Please Login or Register  to view this content.
    but now the range I wan't to operate on has been changed to D1:Z1500, changing range values in macro doesn't change a thing, how can I reset it without creating new worksheet and copying the data, and making new macro.

    Thanks in advance!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Resetting ActiveSheet.Range macro

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-04-2014
    Location
    Warsaw
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Resetting ActiveSheet.Range macro

    nope, it throws back me an error 1004.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Resetting ActiveSheet.Range macro

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Resetting ActiveSheet.Range macro

    What do you mean by 'doesn't change a thing'?

    Are you saying that the macro runs but doesn't filter any 'blas'?
    If so are you sure that there are some blas in the E1:E1500 range?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    04-04-2014
    Location
    Warsaw
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Resetting ActiveSheet.Range macro

    Ok here's what I do, for example, I use macro:
    Please Login or Register  to view this content.
    and here's the result:
    Untitled0.png

    than I reset the macro with another one:
    Please Login or Register  to view this content.
    And when I change range in the first one to:
    Please Login or Register  to view this content.
    The result is exactly the same as it has been recorded in the first time:
    Untitled0.png

    And yes, there are many blas in range D1:AD1000.
    Last edited by drrazor; 04-23-2014 at 11:22 AM.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Resetting ActiveSheet.Range macro

    Pictures don't help us to help you. We cannot see all the data. Please upload a sample workbook so that it can be analyzed. Which line was highlighted in your code when you ran debug and what did the error message say beyond the error number. When you upload your workbook, be sure to include your entire VBA code, especially the one that seems to fail so that it can be examined for correctness.

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Resetting ActiveSheet.Range macro

    Why do you expect any difference? Data ends at row 1233.
    Have you really posted two different pictures? - both have the same name.
    Last but not least - czy nie widzisz różnicy między "obrazek" a "sample workbook"?
    Best Regards,

    Kaper

  9. #9
    Registered User
    Join Date
    04-04-2014
    Location
    Warsaw
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Resetting ActiveSheet.Range macro

    Here's the example. The rectangle selects cells in range D1:AD1800 containing bla in 3rd column from the beginning of the macro. And Oval clears the selection.

    I already changed the selection in VBA for the desirable D1000:AD1800, but macro still records D1:AD1800, and throws me back that as a result.
    Attached Files Attached Files

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Resetting ActiveSheet.Range macro

    use:
    Please Login or Register  to view this content.
    instead

+ 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. Resetting a count to zero when entering a specified item in a data range
    By Kerr01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2014, 04:48 AM
  2. Replies: 3
    Last Post: 03-08-2013, 09:28 AM
  3. Replies: 4
    Last Post: 06-04-2012, 05:44 AM
  4. ActiveSheet Range not working.
    By magni in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2008, 05:03 PM
  5. Operating on a range not in activesheet
    By avveerkar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-22-2007, 08:25 AM

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