Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default access sheets in another workbook

Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default access sheets in another workbook


Workbooks("otherbook.xls").Worksheets("Sheet1")

--

HTH

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

"Stuby" wrote in message
...
Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default access sheets in another workbook

That what I thought my code is as follows

Workbooks("h:\sdrdata.xls").Worksheets("SDRstats") .Active

but I get a run-time error "9" subscript out of range

Any thoughts

Regards

Stuby



On Wed, 21 Apr 2004 19:49:48 +0100, "Bob Phillips"
wrote:


Workbooks("otherbook.xls").Worksheets("Sheet1")

--

HTH

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

"Stuby" wrote in message
...
Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default access sheets in another workbook

open it.

--

HTH

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

"Stuby" wrote in message
...
Found the problem I think, which has created a new one. If I remove
the h:\ it works which brings me to the next question, My file is
stored on a server get to it I need to a path such as
\\someserver\sharefolder\folder\ how do I get it to do this.


Regards

Stuby




On Wed, 21 Apr 2004 19:00:54 GMT,
(Stuby) wrote:

That what I thought my code is as follows

Workbooks("h:\sdrdata.xls").Worksheets("SDRstats" ).Active

but I get a run-time error "9" subscript out of range

Any thoughts

Regards

Stuby



On Wed, 21 Apr 2004 19:49:48 +0100, "Bob Phillips"
wrote:


Workbooks("otherbook.xls").Worksheets("Sheet1")

--

HTH

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

"Stuby" wrote in message
...
Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default access sheets in another workbook

Bob many thanks.

On Wed, 21 Apr 2004 20:27:01 +0100, "Bob Phillips"
wrote:

open it.

--

HTH

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

"Stuby" wrote in message
...
Found the problem I think, which has created a new one. If I remove
the h:\ it works which brings me to the next question, My file is
stored on a server get to it I need to a path such as
\\someserver\sharefolder\folder\ how do I get it to do this.


Regards

Stuby




On Wed, 21 Apr 2004 19:00:54 GMT,
(Stuby) wrote:

That what I thought my code is as follows

Workbooks("h:\sdrdata.xls").Worksheets("SDRstats" ).Active

but I get a run-time error "9" subscript out of range

Any thoughts

Regards

Stuby



On Wed, 21 Apr 2004 19:49:48 +0100, "Bob Phillips"
wrote:


Workbooks("otherbook.xls").Worksheets("Sheet1")

--

HTH

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

"Stuby" wrote in message
...
Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default access sheets in another workbook

No, workbooks refers to the workbooks collection, that is the workbooks open
in that application., not a workbook on a drive.

Also it is Activate, not Active.

--

HTH

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

"Stuby" wrote in message
...
That what I thought my code is as follows

Workbooks("h:\sdrdata.xls").Worksheets("SDRstats") .Active

but I get a run-time error "9" subscript out of range

Any thoughts

Regards

Stuby



On Wed, 21 Apr 2004 19:49:48 +0100, "Bob Phillips"
wrote:


Workbooks("otherbook.xls").Worksheets("Sheet1")

--

HTH

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

"Stuby" wrote in message
...
Hi

How do I access a sheet in another workbook? Due to the data getting
very large I wish to separate all my code into one excel xls and the
data into another that way I can continue to develop the application
without the need to cut and past all the sheets into my new xls each
time I make a code change.


Regards

Stuby








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
Sharing a Workbook But Restricting Access to Certain Sheets Brandy Excel Discussion (Misc queries) 4 June 16th 08 07:58 PM
Access to sheets Neil Excel Discussion (Misc queries) 0 July 17th 07 05:38 PM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
link Access workbook to Excel workbook Toinett Excel Discussion (Misc queries) 1 January 31st 05 03:37 PM


All times are GMT +1. The time now is 04:23 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"