![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com