A
Andyjim
I am trying to saving a file based on the text name in a designated cell in
the workbook. However, with this code, I get an “subscript out of rangeâ€
error. Do you know what I am doing wrong?
Thanks for your help.
Windows("fxRM_Update.xls").Activate
Dim bk As Workbook, bk1 As Workbook
Dim sstr As String
Set bk = Workbooks("fxRM_update.xls")
sstr = bk.Worksheets("lookup").Range("d39").Value
Set bk1 = Workbooks(sstr)
ActiveWorkbook.SaveCopyAs filename:=Workbooks(bk1)
Andy
the workbook. However, with this code, I get an “subscript out of rangeâ€
error. Do you know what I am doing wrong?
Thanks for your help.
Windows("fxRM_Update.xls").Activate
Dim bk As Workbook, bk1 As Workbook
Dim sstr As String
Set bk = Workbooks("fxRM_update.xls")
sstr = bk.Worksheets("lookup").Range("d39").Value
Set bk1 = Workbooks(sstr)
ActiveWorkbook.SaveCopyAs filename:=Workbooks(bk1)
Andy