Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Has the Excel 2003 OLE model changed over SPs?
I have some OLE code living in a non-MS db that opens an existing excel file,
pushes data into specific cells, computes a new file name and then saves off the updated file with this new name. The OLE save code looks like: xlapp.activeworkbook.saveas filename Where filename has been previously computed. The format for this command is correct in the OLE environment I'm working in. We have one user with a newly replaced PC running Excel 2003, no SP at all. When the code gets to this step, it pops a message saying it can't find file C: I've run the code on this user's pc with a debugger on and the variable FileName is correctly set to c:\MyComputedFN.xls On PCs running 2003 SP2 and SP3, there are no problems. I have no idea what SP this user was running before their old PC died. The OLE/COM model changing makes not much sense to me, but I'm really confused as to why this one user has this particular failure at the point the file save is generated. All of the rest of the code works as expected; Excel launches, a specific file is opened, data is added, the file name generated...just won't save. TIA for any tips. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Has the Excel 2003 OLE model changed over SPs?
Not sure why, but I had a similar problem and excluding the application
seemed to work. ActiveWorkbook.SaveAs Filename:= _ "C:\filename.xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False HTH "Doug_F" wrote: I have some OLE code living in a non-MS db that opens an existing excel file, pushes data into specific cells, computes a new file name and then saves off the updated file with this new name. The OLE save code looks like: xlapp.activeworkbook.saveas filename Where filename has been previously computed. The format for this command is correct in the OLE environment I'm working in. We have one user with a newly replaced PC running Excel 2003, no SP at all. When the code gets to this step, it pops a message saying it can't find file C: I've run the code on this user's pc with a debugger on and the variable FileName is correctly set to c:\MyComputedFN.xls On PCs running 2003 SP2 and SP3, there are no problems. I have no idea what SP this user was running before their old PC died. The OLE/COM model changing makes not much sense to me, but I'm really confused as to why this one user has this particular failure at the point the file save is generated. All of the rest of the code works as expected; Excel launches, a specific file is opened, data is added, the file name generated...just won't save. TIA for any tips. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Has the Excel 2003 OLE model changed over SPs?
Thanks. I have a request in to have the use updated to SP3. If that fixes
the problem, I'll probably not go any further. If he's still hosed, I'll create a new version and leave off the 'xlapp.' bit and see what happens. Doug "dmoney" wrote: Not sure why, but I had a similar problem and excluding the application seemed to work. ActiveWorkbook.SaveAs Filename:= _ "C:\filename.xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Has the Excel 2003 OLE model changed over SPs?
Found the problem and it has nothing to do with Excel's OLE API or my code.
Seems this user wasn't in the localdomainAdmin group on his PC so he had no rights to save files onto his own C: drive...IT fixed the rights, code magically starts working. Shazam! Thanks for the reply. Doug "Doug_F" wrote: I have some OLE code living in a non-MS db that opens an existing excel file, pushes data into specific cells, computes a new file name and then saves off the updated file with this new name. The OLE save code looks like: xlapp.activeworkbook.saveas filename Where filename has been previously computed. The format for this command is correct in the OLE environment I'm working in. We have one user with a newly replaced PC running Excel 2003, no SP at all. When the code gets to this step, it pops a message saying it can't find file C: I've run the code on this user's pc with a debugger on and the variable FileName is correctly set to c:\MyComputedFN.xls On PCs running 2003 SP2 and SP3, there are no problems. I have no idea what SP this user was running before their old PC died. The OLE/COM model changing makes not much sense to me, but I'm really confused as to why this one user has this particular failure at the point the file save is generated. All of the rest of the code works as expected; Excel launches, a specific file is opened, data is added, the file name generated...just won't save. TIA for any tips. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
tab colour can't be changed in 2003 Excel | Excel Discussion (Misc queries) | |||
Any Black Scholes Model Formula for Excel 2003? | Excel Discussion (Misc queries) | |||
Changed worksheet file (Excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2003 Object model for Excel 2000 | Excel Programming | |||
Excel 2003 object model | Excel Programming |