Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default get other workbook objects values

Hi,
I wanna run the code which will read it through other workbook.But
following command giving an error
For Each Sht In Workbooks("H:\Copy of GSM ROSTER.xls").Sheets . how
can I read the other workbook object without copy. by the way when my
sheet opens,it opens Copy o ("H:\Copy of GSM ROSTER.xls" as read
only.Any idea how to refer to new open table.
Thanks for the help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default get other workbook objects values

Don't put the full path name in the Workbooks collection index. Instead, use
just the unqualified file name with no drive or path info. E.g.,

For Each Sht In Workbooks("Copy of GSM Roster.xls").Sheets

Or, you can use a Workbook reference when you open the file. E.g.,

Dim WB As Workbook
Set WB = Application.Workbooks.Open("H:\Copy Of GSM Roster.xls")
For Each Sht In WB.Sheets


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


wrote in message
...
Hi,
I wanna run the code which will read it through other workbook.But
following command giving an error
For Each Sht In Workbooks("H:\Copy of GSM ROSTER.xls").Sheets . how
can I read the other workbook object without copy. by the way when my
sheet opens,it opens Copy o ("H:\Copy of GSM ROSTER.xls" as read
only.Any idea how to refer to new open table.
Thanks for the help


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default get other workbook objects values

On Feb 18, 8:46*pm, "Chip Pearson" wrote:
Don't put the full path name in the Workbooks collection index. Instead, use
just the unqualified file name with no drive or path info. E.g.,

For Each Sht In Workbooks("Copy of GSM Roster.xls").Sheets

Or, you can use a Workbook reference when you open the file. E.g.,

Dim WB As Workbook
Set WB = Application.Workbooks.Open("H:\Copy Of GSM Roster.xls")
For Each Sht In WB.Sheets

--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
* * Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLCwww.cpearson.com
(email on web site)

wrote in message

...



Hi,
I wanna run the code which will read it through other workbook.But
following command giving an error
For Each Sht In Workbooks("H:\Copy of GSM ROSTER.xls").Sheets . how
can I read the other workbook object without copy. by the way when my
sheet opens,it opens Copy o ("H:\Copy of GSM ROSTER.xls" as read
only.Any idea how to refer to new open table.
Thanks for the help- Hide quoted text -


- Show quoted text -


Thanks chip,
it works perfect,
have a nice day
regards,
baha
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
Referencing between two Excel Workbook Objects Stephen Schroeder Excel Worksheet Functions 0 July 16th 07 02:08 AM
Find All Embedded Objects in Workbook Andibevan Excel Programming 9 February 10th 06 04:18 PM
remove hyperlinks from objects in the excel workbook using vb asmita Excel Programming 1 July 18th 05 02:46 PM
Programming With Multiple Excel Workbook Objects MDW Excel Programming 3 January 20th 05 02:43 PM
Storing generic objects in workbook via automation Nacho Nachev Excel Programming 0 September 16th 04 03:55 PM


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