+ Reply to Thread
Results 1 to 4 of 4

How can I get my Macro to set a range when it moves to a new sheet

  1. #1
    Registered User
    Join Date
    06-27-2019
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    How can I get my Macro to set a range when it moves to a new sheet

    Hi All,

    Disclaimer - New to coding.

    I have a macro which scrolls through all sheets in a workbook and does "X". However I require a range to be re-set on each sheet, I can't get this to work.
    It appears that the macro is changing sheets but not moving the range of cells to do the action on, I.E. the process reoccurs on the first sheet in the workbook only

    The part of the code which I can't get right is in Bold.


    Any help would be awesome.
    [INDENT]
    Please Login or Register  to view this content.
    Last edited by Mr House; 06-27-2019 at 07:48 AM. Reason: Improved clarity of question

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    372

    Re: How can I get my Macro to set a range when it moves to a new sheet

    Change the instruction to

    Please Login or Register  to view this content.
    so that you are formatting each Sheet in the collection and not only the Active one.
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    Registered User
    Join Date
    06-27-2019
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    Re: How can I get my Macro to set a range when it moves to a new sheet

    Thank you for your reply,

    I actually had that originally, same problem.

    Regards
    Mr House

  4. #4
    Registered User
    Join Date
    06-27-2019
    Location
    England
    MS-Off Ver
    2013
    Posts
    3

    Re: How can I get my Macro to set a range when it moves to a new sheet

    Solved this :D

+ 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. [SOLVED] Macro that moves rows to another sheet.
    By Ricksterr94 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2014, 07:01 PM
  2. Plz HELP:Have Macro that moves rows to other sheet but need it to delete later row
    By frank521 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2013, 03:46 PM
  3. [SOLVED] Need help with Macro that moves row to another sheet
    By audioboxer in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-23-2013, 05:34 PM
  4. First cell in range moves to the first cell in sheet when sorting with VB.Net
    By darkxer0x in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2012, 06:53 AM
  5. Problems creating a time macro that moves data from one sheet to another.
    By Sanorah in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2012, 08:27 AM
  6. Replies: 1
    Last Post: 03-01-2011, 03:31 PM
  7. Dynamic Range that moves
    By learning_vba in forum Excel General
    Replies: 5
    Last Post: 07-28-2010, 03:02 PM

Tags for this Thread

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