Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default opening a workbook

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default opening a workbook

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

-----Original Message-----
Hi I am trying to open a workbook I figured out how to

open a specific
workbook if I have the name. My problem is I Want to open

a workbook
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

ROD


---
Message posted from http://www.ExcelForum.com/

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
when opening an Excel Workbook, another blank workbook also opens Gord Dibben Excel Discussion (Misc queries) 0 October 12th 07 09:49 PM
when opening an Excel Workbook, another blank workbook also opens spmu Excel Discussion (Misc queries) 0 October 12th 07 01:46 PM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 07:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"