opening a workbook

  • Thread starter Thread starter rjtaylor
  • Start date Start date
R

rjtaylor

Hi I am trying to open a workbook I figured out how to open a specifi
workbook if I have the name. My problem is I Want to open a workboo
that is named the same name as the activeworkbook plus the name
Backup

Workbooks.Open ("C:\Documents and Settings\default\Desktop\ORL
Schedule\")

I am not sure what to put after Schedule\

I did get the name of active workbook as b (but it adds .xls to it)
Thanks In Advance

RO
 
Best to save the name of the activeworkbook to a variable,
then remove the .xls from the variable:
eg
awbname = ActiveWorkbook.Name
awbname=left(awbname, len(awbname)-4)

Then you can use the variable to complete your string:

Workbooks.Open ("C:\Documents and
Settings\default\Desktop\ORL
Schedule\" & awbname & "Backup.xls")

Hope this helps
 
Back
Top