selecting workbook
Ok....
I removed the Workbooks.open statement.
I also tried both WkBkName, and WkBkName1.
Both give the same error as before. "subscript out of range"
When you say- "if the WkBkName file hasn't been saved yet, it won't work" --
you're talking about an initial saveAs, correct?
The file already is saved with a file name. The reason that I've done this
is because we have to update these files on a regular basis, and so we're
adding a worksheet for each data package we're processing, and then modifying
some data on other worksheets.
The worksheet that I'm adding is from a template file, and I just want to
pull a copy over from a formatted template with all of the raw formats, sheet
layouts, etc...... on it.
I'd initially tried Workbooks(WkBkName).select but got the "subscript out of
range" error with that too.
|