Results 1 to 5 of 5

Macros not working after upgrade to v2010

Threaded View

  1. #1
    Registered User
    Join Date
    06-19-2009
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2003
    Posts
    4

    Macros not working after upgrade to v2010

    ***** EDIT *****
    Never mind... I'm an idiot

    The problem was I deleted a column from the worksheet the same time the upgrade happened and I never changed the test column to reflect the now missing column... column 9 is now column 7

    Please disrgard.

    **********************Original post is below**************************




    I have some VBA that simply move a row to the last row of another worksheet.... worked fine.

    Recently, my company upgraded (without telling any one or allowing any one to test anything out) to version 2010. Now, none of my maros work. If I click on the View Macros, nothing is listed there. If I right click on the sheet tab and select "View Code".... the VBA is all still there.... but dosen't execute.

    Here is the code of one of my macros


    Private Sub Worksheet_Change(ByVal Target As Range)
    'stop anything re-triggering this event macro
    Application.EnableEvents = False
    
    On Error GoTo ErrHnd
    
    'Check column 7 for test value of "NO"
    If Target.Column = 9 And UCase(Target.Text) = "NO" Then
        Dim rngCell As Range
        Dim rngDest As Range
        Dim strRowAddr As String
        
        'save target row address
        strRowAddr = Target.Address
        
        'find next row in destination worksheet
        Set rngDest = Worksheets("Pending Schedule"). _
                   Range("A" & CStr(Application.Rows.Count)).End(xlUp).Offset(1, 0)
    
        'cut the source row & paste to destination
        Target.EntireRow.Cut Destination:=rngDest
        'remove the cut/copy range marquee
        Application.CutCopyMode = False
         'delete the source row
        Worksheets("Completed Schedule").Range(strRowAddr).EntireRow.Delete _
            Shift:=xlUp
    End If
    Application.EnableEvents = True
    Exit Sub
    
    'error handler
    ErrHnd:
    Err.Clear
    Application.EnableEvents = True
    End Sub
    I have gone into File -> Options -> Trust Center -> Trust Center Settings-> Marco Settings and set "Enable all macros" as well as checking "Trust access to the VBA project object model".... with no luck.

    Any help would be appreciated.
    Last edited by Boomn4x4; 10-20-2010 at 11:13 AM.

Thread Information

Users Browsing this Thread

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

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