Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
Does anyone have any guesses as to why my Excel 2000 template might be
crashing, with an automation error, when it tries to save a workbook with a filename longer than 58 characters (including extension)? Bizarrely the workbook will have originally been created and saved by the same template - the filename having been derived from information provided by the user at startup. Now I have built an upgrade facility into the template so that old workbooks can have their data pulled into new copies of a modified template. It is after upgrading and then saving a backup copy of the old Workbook and/or the upgraded copy that Excel decides to get fussy about the length of filename. Anybody any clues? NickH |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
It appears I may have jumped the gun here. So far this only happenening
to a single file and it happens whether I save the file programmatically or manually. Almost as though the workbook has been corrupted by the PC that created it (somewhere in Europe). A wierd form of corruption though, and I'd still like to hear from anyone with any insight on this. It may yet turn out to be a show-stopper. NickH |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
I don't have a guess...
But maybe it's the name that's being use (although, I don't think it should have caused excel to crash--your macro can crash, but not excel!). Are you saving the file with the same name (manually and via code)? If no, what's the name of the file you try to use when it blows up real good? NickH wrote: It appears I may have jumped the gun here. So far this only happenening to a single file and it happens whether I save the file programmatically or manually. Almost as though the workbook has been corrupted by the PC that created it (somewhere in Europe). A wierd form of corruption though, and I'd still like to hear from anyone with any insight on this. It may yet turn out to be a show-stopper. NickH -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
Thanks for your interest Dave.
I can't post the actual filename as it contains customer sensitive information but it is in the following format... 123456 A Long Customer Name IT Project Name Weekly Report 060720.xls The VBA code first tries to save the original file with "OLD_" prefixed to the original name and then saves the upgraded version using the original name. It crashes with an automation error (The object invoked has disconnected from its clients) at the first save then comes up with the 'Send Error Report' dialog followed by a memory reference error. If I comment out the first save the same thing happens at the second save. Exactly the same thing happened (every time) if I tried to save manually using the same names. I use the past tense because when I come to test the behaviour now, manual saves seem to work fine. The only thing that's different really is that I've closed Outlook. Very strange. I'll get chance to test on more machines in the office on Thursday. If I'm lucky it may just be my machine. NickH |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
One of the few times I've seen that disconnected from client message was when I
closed the wrong workbook and tried to do something with the variable that represented that closed workbook. (It was a simple typo.) Maybe you can review your code once more??? NickH wrote: Thanks for your interest Dave. I can't post the actual filename as it contains customer sensitive information but it is in the following format... 123456 A Long Customer Name IT Project Name Weekly Report 060720.xls The VBA code first tries to save the original file with "OLD_" prefixed to the original name and then saves the upgraded version using the original name. It crashes with an automation error (The object invoked has disconnected from its clients) at the first save then comes up with the 'Send Error Report' dialog followed by a memory reference error. If I comment out the first save the same thing happens at the second save. Exactly the same thing happened (every time) if I tried to save manually using the same names. I use the past tense because when I come to test the behaviour now, manual saves seem to work fine. The only thing that's different really is that I've closed Outlook. Very strange. I'll get chance to test on more machines in the office on Thursday. If I'm lucky it may just be my machine. NickH -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
The thing is Dave, it only falls over when upgrading this one
particular workbook. Like I say, if I shorten the workbook's name to 58 characters or less it runs fine. Other workbooks with equally long filenames, in the same format as mentioned above (there are no non-alpha-numeric characters), don't have a problem. NickH |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
You saving all these files with the same path also ?
Excel 2K will error on full path+filename over 218 chars. Although not with that error, but 'File Cannot be found" NickHK "NickH" wrote in message oups.com... The thing is Dave, it only falls over when upgrading this one particular workbook. Like I say, if I shorten the workbook's name to 58 characters or less it runs fine. Other workbooks with equally long filenames, in the same format as mentioned above (there are no non-alpha-numeric characters), don't have a problem. NickH |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
That was for .Open, not sure for .SaveAs, but you could test.
Also, I have seen different behaviour using .SaveAs v. SaveCopyAs with Unicode paths. The former fails, the latter succeeds with exactly the same Path/Filename. NickHK "NickHK" wrote in message ... You saving all these files with the same path also ? Excel 2K will error on full path+filename over 218 chars. Although not with that error, but 'File Cannot be found" NickHK "NickH" wrote in message oups.com... The thing is Dave, it only falls over when upgrading this one particular workbook. Like I say, if I shorten the workbook's name to 58 characters or less it runs fine. Other workbooks with equally long filenames, in the same format as mentioned above (there are no non-alpha-numeric characters), don't have a problem. NickH |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2000 58 character Filename Limit?
Thanks NickHK,
Yes, all saving to the same folder and maximum path+filename combination coming out at around 150 characters. However, this does appear to be related to that chestnut because if I move the files up the directory tree nearer to the root the problem dissappears! There is also some wierd link with Outlook regarding manual saves. If Outlook is closed manual saves work fine, if its open one or two of the longer filename workbooks crash to the 'Send Error Report' dialog. Then I have to kill the EXCEL.EXE process in Task Manager. The client Uses Lotus Notes so I can probably get away with an entry in the trouble-shooting section of the manual regarding long path+filename combinations. Thanks for your help chaps. Kind regards, NickH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I increase viewable cell character count limit in Excel? | Excel Discussion (Misc queries) | |||
Excel Character Path Limit for Asian Characters | Excel Discussion (Misc queries) | |||
Character limit on CSV files in excel? | Excel Discussion (Misc queries) | |||
Limit number of character per cell to 26 in excel | Excel Worksheet Functions | |||
Character limit in an Excel Row | Excel Worksheet Functions |