Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel XP & Win XP
I'm helping an OP. He has Excel 2003 Pro. He and I have now run the code shown below several times on both our computers. His computer fails on the "Set wb = Workbooks.Open.........." line every time. Note that the code is looking for a .csv file. The Temp folder has a bunch of those. It also has one .xls file. We both changed the ".csv" to ".xls" in the below code and ran the code again. In ALL cases, the file opens on my computer and NEVER opens on his. The error is always on the "Set wb..." line. My question: Why does this code fail on his computer and not on mine? Thanks for your time. Otto Sub testopen() ThePath = "C:\Temp\" ChDir ThePath TheFile = Dir("*.csv") Application.DisplayAlerts = False Set wb = Workbooks.Open(ThePath & TheFile) Application.DisplayAlerts = True End Sub PS: I sent him the entire file, so it's not a case of copy/paste. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 hyperlinks to Adobe files fail to open | Excel Discussion (Misc queries) | |||
Open and Save fail after SP1 | Setting up and Configuration of Excel | |||
Cause workbook to fail to open if user opts to disable macros | Excel Programming | |||
Templates fail to open | Setting up and Configuration of Excel | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) |