Runtime error 424 object required on Set Statement
Good afternoon, Can someone please explain why I'm getting a runtime
errror on the following code:
' I declared the workbook and worksheet in the beginning of the
program:
Dim volume_WB as Workbook
Dim volume_sheet as Worksheet
' I open the workbook
Set volume_WB = Workbooks.Open("DASD.volumes.test.xls", UpdateLinks:=0)
' I call a routine to pass the workbook
Call dasdType(site, frowV2X, frowSHK, volume_WB, volume_sheet)
' site = a 2-character desgination. it will be either HQ or NE
' The program bombs on the first line:
Set volume_sheet = volume_WB.Sheets(site & "-V2X")
What am I doing wrong?
|