Excel 2007 Problem

JST013

Board Regular
Joined
Mar 11, 2015
Messages
74
Code:
Sub coveractive()
    Dim cover As Worksheet
    Dim wb As Workbook
    
    Set cover = ThisWorkbook.Sheets("Cover")
    cover.Activate
    
End Sub
Private Sub handletemp()
    Dim wb As Workbook
    Set wb = Workbooks("Workbook.xlsm")
    Dim ws As Worksheet
    Set ws = wb.Sheets("Temporary Sheet")
    Dim tbl As Range
    Set tbl = ws.Range("Temp")
    Dim archive As Worksheet
    Set archive = wb.Sheets("List")
    Dim rng As Range


[I][B]        [U]nr = archive.Cells(Rows.Count, 1).End(xlUp).Row + 1[/U][/B][/I]
        tbl.Copy
        archive.Activate
        archive.Cells(nr, 1).Select
        Selection.PasteSpecial Operation:=xlNone, _
                SkipBlanks:=False, Transpose:=False
        tbl.Clear
   
End Sub


Private Sub workbook_open()


    handletemp
    coveractive




End Sub

can anyone help me understand why the underlined line of code would not run in excel 2007? It seems to run just fine in 2013 and 2010...Haven't tried on anything earlier than 2007
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
maybe try
Sheets("List").Cells(Rows.Count, 1).End(xlUp).Row + 1
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,122
Members
452,545
Latest member
boybenqn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top