+ Reply to Thread
Results 1 to 2 of 2

Connecting two VBA codes (Private Sub Worksheet_Change(ByVal Target As Range)

  1. #1
    Registered User
    Join Date
    08-25-2014
    Location
    Zagreb, Croatia
    MS-Off Ver
    2010
    Posts
    1

    Connecting two VBA codes (Private Sub Worksheet_Change(ByVal Target As Range)

    Hi everyone,

    this is my first post so sorry in advance if I am doing anything wrong.

    I am total "tabula rasa" when it comes to VBA. PLs help me to combine some code which would do the following:

    I have one Oval shape which changes color due to value in cell A1.

    It would be great if I could multiply this shape and connect it with cells A2, A3, A4 and so on.

    Point is to get shapes which change they color when values in A cells changes between "MC", "HE", "CA" and "OTH" (in original workbook they are result of vlookup formula).

    Example is attached.

    Thanks a million,

    Tin
    Attached Files Attached Files

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Connecting two VBA codes (Private Sub Worksheet_Change(ByVal Target As Range)

    If cells contain formulas they will not raise Change event when they are updated. You must rather use Calculate event which will be raised whenever worksheet is calculated for any reason. If you do use naming convention so shapes are named with cell address - 'OvalA1', OvalA2 et cetera - you may use:

    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

+ 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. Private Sub Worksheet_Change(ByVal Target As Range)
    By BigJim68 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-27-2014, 01:57 PM
  2. [SOLVED] Private Sub Worksheet_Change(ByVal Target As Range) End Sub
    By kanonathena in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-10-2013, 12:25 AM
  3. Private Sub Worksheet_Change(ByVal Target As Range) Help
    By adamsj1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-28-2012, 09:17 AM
  4. Private Sub Worksheet_Change(ByVal Target As Range)
    By Arturo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2005, 11:06 AM
  5. Private Sub Worksheet_Change(ByVal Target As Range)
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2005, 02:59 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