-
The last line of the first macro is:
[VBa] Application.Run "'Owner Operater Run Log.xlsm'!Load_Analysis"
[/VBA]
which implies the second macro is in a different workbook,
At the start of the second macro you have:
[vba]Sub Load_Analysis()
'
' Macro1 Macro
'
'
Dim lastRow As Long
lastRow = Range("$B$7:$Y$7").End(xlDown).Row
Dim rangeTwo As Range
Sheets("Load Analysis").Select
[/vba]
So the last row calculation does it's calculation on whatever workbook/worksheet the last macro left it on. I suspect your error is because you are not correctly selecting the workbook and worksheet at the start of the second macro.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules