Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello-
I wrote code that works with several open workbooks. I specify particular workbooks using the Workbooks collection and the name of the workbook, e.g., Workbooks ("Name"). There are a few machines, however, that require the ".xls" extension, e.g., Workbooks("Name.xls"). Can I do something, like reference a particular library, to make sure that one of the methods is going to work? Thanks. -Paul Larick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not try both names, with error handling wrapped around it, to test
neither existing? -- HTH RP (remove nothere from the email address if mailing direct) "Paul Larick" wrote in message ... Hello- I wrote code that works with several open workbooks. I specify particular workbooks using the Workbooks collection and the name of the workbook, e.g., Workbooks ("Name"). There are a few machines, however, that require the ".xls" extension, e.g., Workbooks("Name.xls"). Can I do something, like reference a particular library, to make sure that one of the methods is going to work? Thanks. -Paul Larick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is based on a Windows setting. Always use the .xls extension
to be safe. It will always work. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul Larick" wrote in message ... Hello- I wrote code that works with several open workbooks. I specify particular workbooks using the Workbooks collection and the name of the workbook, e.g., Workbooks ("Name"). There are a few machines, however, that require the ".xls" extension, e.g., Workbooks("Name.xls"). Can I do something, like reference a particular library, to make sure that one of the methods is going to work? Thanks. -Paul Larick |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Paul
Like Bob, I think the easiest fastest way is to test both. But for the fun of it, see if it has to do with "hide extensions for known file types" in Explorer. That would be wether registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Advance d\HideFileExt is 0 (false) or 1(true). HTH. Best wishes Harald "Paul Larick" skrev i melding ... Hello- I wrote code that works with several open workbooks. I specify particular workbooks using the Workbooks collection and the name of the workbook, e.g., Workbooks ("Name"). There are a few machines, however, that require the ".xls" extension, e.g., Workbooks("Name.xls"). Can I do something, like reference a particular library, to make sure that one of the methods is going to work? Thanks. -Paul Larick |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Chip Pearson" skrev i melding
... (..) Always use the .xls extension to be safe. It will always work. It's that simple ? Thanks Chip. Best wishes Harald |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy a collection into a new workbook. | Excel Discussion (Misc queries) | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming | |||
Collection | Excel Programming | |||
How to find the type of Sheet in Excel.Workbook.sheets collection | Excel Programming |