Results 1 to 5 of 5

Help with combining two worksheet_change macros

Threaded View

  1. #1
    Registered User
    Join Date
    02-16-2015
    Location
    Australia
    MS-Off Ver
    2012 on mac
    Posts
    38

    Help with combining two worksheet_change macros

    Hello, I am trying to combine these two worksheet_change macros any help is appreciated.

    Macro 1
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
        If Intersect(Target, Range("D11:D10")) Is Nothing Then Exit Sub
        On Error GoTo Badname
        ActiveSheet.Name = Range("D11").Value & " " & Range("D10").Value & ""
        Exit Sub
    Badname:
        MsgBox "Error Please Revise & Chr(13)" _
        & "It appears to contain one or more " & Chr(13) _
        & "illegal characters." & Chr(13)
        Range("D11").Activate
    End Sub
    Macro2
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Intersect(Range("5:5"), Target) Is Nothing Then Exit Sub
        Sheets(Target.Value).Activate
    End Sub
    Last edited by goatie43; 03-27-2015 at 09:07 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Combining a Sub Worksheet_Change and S W_Calculate
    By peasther in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2015, 01:11 AM
  2. Combining two Worksheet_Change
    By Intern2 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-11-2013, 10:47 AM
  3. [SOLVED] Combining 2 different Worksheet_Change
    By dacos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2012, 08:28 PM
  4. Combining two Private Sub Worksheet_Change
    By bdf0827 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2011, 08:58 AM
  5. Combining Two Worksheet_Change Entries
    By alex1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2007, 07:57 AM

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