+ Reply to Thread
Results 1 to 2 of 2

Not sure how to combine two Private Sub Worksheet_Changes

  1. #1
    Registered User
    Join Date
    07-13-2014
    Location
    Arizona
    MS-Off Ver
    2010
    Posts
    18

    Not sure how to combine two Private Sub Worksheet_Changes

    Hello,

    I am having issues combining tow Worksheet Changes. The first part of the code enables a shape based on the value selected in Cell C4. The second worksheet change calls a macro (email notification that hours are over 10) to run when the value in P6 exceeds 10

    I am getting a Compile error: Else without If.

    Any help that can be provided would be greatly appreciated.

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 08-23-2014 at 11:51 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Not sure how to combine two Private Sub Worksheet_Changes

    I added the missing End IF above and colored it in red. Your code is properly indented, so the pairs if IF/End If should be easy to spot.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. I need to combine 2 private subs
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 10:30 AM
  2. Combine Private Sub Worksheet_Change VBA Code on same worksheet
    By stanlelma in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2013, 12:42 PM
  3. multiple worksheet_changes causing errors
    By daschmidt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2012, 03:15 PM
  4. How to have 2 Private Sub Worksheet_Changes
    By mmctague in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-29-2012, 05:23 PM
  5. [SOLVED] Combine Two Similar Private Subs
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-27-2012, 02:15 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