+ Reply to Thread
Results 1 to 4 of 4

Need Macro to run on 1 sheet only

  1. #1
    Registered User
    Join Date
    11-16-2018
    Location
    Tulsa,Ok
    MS-Off Ver
    Office 2016
    Posts
    2

    Exclamation Need Macro to run on 1 sheet only

    Hello, I am currently using this macro on sheet 1:
    Please Login or Register  to view this content.
    to turn vertical columns of data, to horizontal columns of data. When doing so it will mess up formulas I have on sheet 2. Any ideas on how to solve this problem?
    Last edited by 6StringJazzer; 11-16-2018 at 02:22 PM.

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,888

    Re: Need Macro to run on 1 sheet only

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    What module is this code in? If it is in the module for Sheet1 there is nothing here that could possibly affect Sheet2.

    If instead it is in a general module (like Module1) then it will operate on whatever the active sheet is. You want this code to be in the Sheet1 module.

    Alternatively, if in a general module, you can explicitly qualify the references for Sheet1. Note the With clause and that I have added dots in front of all references to Cells and Range.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-16-2018
    Location
    Tulsa,Ok
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Need Macro to run on 1 sheet only

    The macro is stores in the sheet module.

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,888

    Re: Need Macro to run on 1 sheet only

    If this is in the Sheet1 module there is no way for it to touch Sheet2.

    Please attach your file for further diagnosis. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

+ 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 updating after selecting another sheet and back to Macro enabled sheet?
    By Imran Magsi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2016, 04:38 AM
  2. [SOLVED] Macro to copy data from a master sheet to separate sheet as per date using a macro
    By tmaster81 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 08:05 AM
  3. Macro to gnereate new sheet which includes the macro to generate a new sheet
    By jocanon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2013, 05:15 PM
  4. [SOLVED] Macro running on active sheet instead of sheet defined in macro
    By davegscott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2013, 02:04 PM
  5. [SOLVED] Macro to Copy Data from one Sheet A to Sheet B based on value in cell on sheet A
    By scass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2012, 07:21 PM
  6. Replies: 1
    Last Post: 07-30-2012, 02:35 PM
  7. [SOLVED] When sheet is activated, execute macro in other sheet and return to sheet
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2012, 10:50 AM

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