+ Reply to Thread
Results 1 to 4 of 4

VBA workbook change dosent work on formel. ?? - Need to react on calculation.

  1. #1
    Registered User
    Join Date
    10-15-2014
    Location
    Copenhagen
    MS-Off Ver
    201, 2013, 365
    Posts
    42

    Question VBA workbook change dosent work on formel. ?? - Need to react on calculation.

    Hi All.

    Hope you can help again.
    I have this code, that works perfectly in active sheet.
    BUT, I need the code to react on change in a different worksheet,

    So when the change in P3, happens on sheet 2, then in sheet 1, have to hide rows 56:58.
    I have tried to enter the code under calculate, with naming the different sheets, can anybody help me.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: VBA workbook change dosent work on formel. ?? - Need to react on calculation.

    Assuming you have the code in Sheet2 module.
    Replace "Sheet1" with actual sheet name of the sheet where you want to hide rows.
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: VBA workbook change dosent work on formel. ?? - Need to react on calculation.

    Hi,

    See if the attached makes sense. VBA code behind a sheet is supposed to work on that sheet only. You will need to create a module in the "Modules" area to work on any sheet. The topic is called Scope and found at: http://www.cpearson.com/excel/Scope.aspx

    Sheet Module vs Module Module.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    10-15-2014
    Location
    Copenhagen
    MS-Off Ver
    201, 2013, 365
    Posts
    42

    Re: VBA workbook change dosent work on formel. ?? - Need to react on calculation.

    Quote Originally Posted by MarvinP View Post
    Hi,

    See if the attached makes sense. VBA code behind a sheet is supposed to work on that sheet only. You will need to create a module in the "Modules" area to work on any sheet. The topic is called Scope and found at: http://www.cpearson.com/excel/Scope.aspx

    Attachment 520434
    Mr. MarvinP - You are a champ - it works like a charm... I am really happy - Thanks.

+ 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 with filedialog dosent work in all workbooks
    By ATOP in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2016, 02:32 AM
  2. Replies: 1
    Last Post: 02-18-2016, 05:27 PM
  3. [SOLVED] INDEX dosent work???
    By ExcelBG in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2013, 03:59 PM
  4. [SOLVED] Data validation with the table feature on another worksheet dosent work
    By Masun in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2013, 06:54 AM
  5. input box dosent quite work
    By babar48 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2011, 07:33 PM
  6. Worksheet Code to react to column change
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2011, 01:08 PM
  7. why sum dosent work.
    By EXCEL NEWS in forum Excel General
    Replies: 9
    Last Post: 06-01-2005, 05: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