M
Markus
I get this error when I run the code below. Any way to fix
this?
Run Time Error 1004
Method 'Open' of object 'Workbooks' failed
it then Highlights the WorkBook.Open Section of the code.
Sub CB1_Click()
Dim wb As Workbook
Application.ScreenUpdating = False ' turn off the
screen updating
Set wb = Workbooks.Open("H:\My
Documents\WorkInProgress\QARP2004
\ProgramReports", "PG1Rep2004.xls", True, True)
' open the source workbook, read only
With ThisWorkbook.Worksheets("SR")
' read data from the source workbook
.Range("A8").Formula = wb.Worksheets
("EvaluationCalculator").Range("D1").Formula
End With
wb.Close False ' close the source workbook without
saving any changes
Application.ScreenUpdating = True ' turn on the screen
updating
End Sub
this?
Run Time Error 1004
Method 'Open' of object 'Workbooks' failed
it then Highlights the WorkBook.Open Section of the code.
Sub CB1_Click()
Dim wb As Workbook
Application.ScreenUpdating = False ' turn off the
screen updating
Set wb = Workbooks.Open("H:\My
Documents\WorkInProgress\QARP2004
\ProgramReports", "PG1Rep2004.xls", True, True)
' open the source workbook, read only
With ThisWorkbook.Worksheets("SR")
' read data from the source workbook
.Range("A8").Formula = wb.Worksheets
("EvaluationCalculator").Range("D1").Formula
End With
wb.Close False ' close the source workbook without
saving any changes
Application.ScreenUpdating = True ' turn on the screen
updating
End Sub