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

Sub opensingleworkbook()
Workbooks.Open "C:\Documents and Settings\hprasadh\Desktop\ABC Format.xls"
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Hari" wrote in message
...
Hi,

I have a file named "ABC format" in the location "C:\Documents and
Settings\hprasadh\Desktop".

I want to open this file automatically. I wrote (rather pinched it from NG
with some modification) the following as a module in a new workbook:-

Sub opensingleworkbook()
Workbooks("C:\Documents and Settings\hprasadh\Desktop\ABC Format").Open
End Sub

Im getting runtime error '9' : Subsript out of range.

Please tell me how to overcome the same. (The file ABC format exists)

Regards,
Hari
India





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Opening a single workbook

Hi,

I have a file named "ABC format" in the location "C:\Documents and
Settings\hprasadh\Desktop".

I want to open this file automatically. I wrote (rather pinched it from NG
with some modification) the following as a module in a new workbook:-

Sub opensingleworkbook()
Workbooks("C:\Documents and Settings\hprasadh\Desktop\ABC Format").Open
End Sub

Im getting runtime error '9' : Subsript out of range.

Please tell me how to overcome the same. (The file ABC format exists)

Regards,
Hari
India



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Opening a single workbook

This syntax might work better.

Troy

Sub opensingleworkbook()
Workbooks.Open "C:\Documents and Settings\hprasadh\Desktop\ABC Format"
End Sub


"Hari" wrote in message
...
Hi,

I have a file named "ABC format" in the location "C:\Documents and
Settings\hprasadh\Desktop".

I want to open this file automatically. I wrote (rather pinched it from NG
with some modification) the following as a module in a new workbook:-

Sub opensingleworkbook()
Workbooks("C:\Documents and Settings\hprasadh\Desktop\ABC Format").Open
End Sub

Im getting runtime error '9' : Subsript out of range.

Please tell me how to overcome the same. (The file ABC format exists)

Regards,
Hari
India





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a single workbook

Hari,

Compair this with your code.
Workbooks.Open Filename:= _
"C:\Documents and Settings\MyName\My Documents\Odoms.xl


HTH

Charle

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Opening a single workbook

Thanx a lot Bob, Charles and Troy.

Im posing doubts after doubts and all of u have been very helpful in getting
me across one bridge after another safely.

Long live the Newsgroups ( I hope I learn to such a level that Im able to
answer other's doubts very soon in the future.)

Thanx again

Regards,
Hari
India


"Charles " wrote in message
...
Hari,

Compair this with your code.
Workbooks.Open Filename:= _
"C:\Documents and Settings\MyName\My Documents\Odoms.xl


HTH

Charles


---
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
merging single worksheet files into a single workbook DDK Excel Discussion (Misc queries) 1 December 5th 06 05:25 PM
is it possible to use F9 to manually calculate in a single sheet or single workbook? Hersbt Excel Discussion (Misc queries) 2 December 29th 04 04:42 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 04:17 AM.

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"