Hi all
I have the following code
which works fine, however, as the the workbook is already open all I want to do is set a reference to it so I can write to it later. This gives a "Subcript out of range" error (Sportbook is dimmed as a workbook)
What am I doing wrong?
I have the following code
Code:
Workbooks.Open FileName:="C:\Sports\Golf.xlsm"
which works fine, however, as the the workbook is already open all I want to do is set a reference to it so I can write to it later. This gives a "Subcript out of range" error (Sportbook is dimmed as a workbook)
Code:
Set Sportbook = Application.Workbooks("C:\Sports\Golf.xlsm")
What am I doing wrong?