Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referencing between two Excel Workbook Objects | Excel Worksheet Functions | |||
Find All Embedded Objects in Workbook | Excel Programming | |||
remove hyperlinks from objects in the excel workbook using vb | Excel Programming | |||
Programming With Multiple Excel Workbook Objects | Excel Programming | |||
Storing generic objects in workbook via automation | Excel Programming |