+ Reply to Thread
Results 1 to 2 of 2

VBA-WorkBook_Change

  1. #1
    Registered User
    Join Date
    12-07-2021
    Location
    Charlotte, NC
    MS-Off Ver
    365
    Posts
    1

    VBA-WorkBook_Change

    Cross-posted with responses at https://www.mrexcel.com/board/thread...hange.1189686/

    Hello,

    I am very new to VBA so this might be a dumb question.

    For our company, we have an Excel workbook that has multiple sheets.

    We have a Master sheet that all the changes will be made to.

    The other sheets are Branches of the master that have linked cells to the master.

    I know that there is a way to implement a worksheet_change in order to change the interior color of a cell when it is MANUALLY changed and I know how to implement that.

    However, is there a way to implement that same color change across all NON-MANUALLY changed cells within the workbook?

    Let me try to give an example so you can better understand what I'm trying to do.

    Lets say cell A1 in sheet 1 has the word 'Hello'.

    I want cell B2 in sheet 2 to have whatever cell A1 in sheet 1 has... therefore cell B1 in sheet 2 would also have the word 'Hello'.

    Now, lets say I want to change cell A1 in sheet 1 to 'Goodbye', I would want cell A1 in sheet 1 to highlight in a light green color. I would then want cell B2 in sheet 2 to say 'Goodbye' (Which it will already do since it is linked to cell A1 in sheet 1) but more importantly, highlight cell b1 in that same light green color.

    [VBA]Private Sub Worksheet_Change(ByVal Target As Range)
    Target.Interior.Color = RGB(216, 228, 188)
    End Sub[/VBA]

    This ^^ is what I used to change the color of a cell if it was changed on the master sheet. Which it does work, but just for that sheet.

    I just don't know how to tell vba, "Hey, I want you to fill the background of all cells that were changed across the workbook."
    Last edited by 6StringJazzer; 12-07-2021 at 03:41 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,703

    Re: VBA-WorkBook_Change

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    I have added the link for you since this is your first post.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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] Can I Workbook_Change() or similar from an addin?
    By smpita in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-08-2017, 01:51 PM
  2. [SOLVED] Workbook_change event macro
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2016, 03:00 AM
  3. Workbook_Change how apply for all Worksheet
    By Siegfrid15 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2016, 03:15 AM
  4. [SOLVED] How to speed up a workbook_change macro
    By a8747 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2016, 02:05 PM
  5. Workbook_Change Strange Behavior
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2015, 04:51 PM
  6. [SOLVED] Workbook_Change
    By Taemex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2013, 03:57 AM
  7. workbook_change
    By kizzie in forum Excel General
    Replies: 3
    Last Post: 08-11-2005, 01: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