What is SyntheticShieldInvoice?
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"RPIJG " wrote in message
...
This opens the workbook correctly but then gives me a runtime 424 object
required...
Private Sub CommandButton1_Click()
Dim iLastRow As Long
Dim ans
ans = MsgBox("Are you sure? Doing so will automatically create a new
invoice.", vbYesNo)
If ans = vbYes Then
Workbooks.Open Filename:="C:\Documents and Settings\Owner\My
Documents\MonthlyTotals.xls"
With ActiveWorkbook
With .Worksheets("MonthlyTotals")
iLastRow = .Cells(Rows.Count, "A").End(xlUp).Row + 1
Range("A" & iLastRow).Value = SyntheticShieldInvoice.Worksheets("Sales
Invoice"). _
Range("O3").Value
Range("B" & iLastRow).Value = SyntheticShieldInvoice.Worksheets("Sales
Invoice"). _
Range("O4").Value
Range("C" & iLastRow).Value = SyntheticShieldInvoice.Worksheets("Sales
Invoice"). _
Range("N37").Value
Range("D" & iLastRow).Value = SyntheticShieldInvoice.Worksheets("Sales
Invoice"). _
Range("N40").Value
Range("E" & iLastRow).Value = SyntheticShieldInvoice.Worksheets("Sales
Invoice"). _
Range("O43").Value
End With
End With
End If
End Sub
---
Message posted from http://www.ExcelForum.com/