Opening a File

R

Ronbo

I need a way to activate a workbook. I am in the open
workbook that has a 8 character file name 1234.xls. The
workbook I would like to activate is the same name, less
2 characters in the name or 12.xls. I have been trying
the following but neither work

TmpName2 = Left(ActiveWorkbook.Name, Len
(ActiveWorkbook.Name) - 6)

Workbooks.Open ("C:\ path\" & tmpName2 & ".xls")

Or

Windows("tmpName.xls").Activate

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top