Subscript is out of Range
In you previous post, you said you wanted to compare the current workbook
against the most recent workbook. Dave is making an assumption that the
current workbook is named after the current date:
? "wip " & Format(Date, "dd-mm-yy") & ".xls"
wip 19-12-04.xls
If you don't have a workbook open with that name, then you would get an
error.
--
Regards,
Tom Ogilvy
"teresa" wrote in message
...
Hi,
Below is an extract from a macro, why do I get 'Subscript is out of
range',
many thanks
Sub yy()
Dim curWkbk As Workbook
Set curWkbk = Workbooks("wip " & Format(Date, "dd-mm-yy") & ".xls")
End Sub
|