ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Filename length in Excel limited to 92 characters (https://www.excelbanter.com/excel-discussion-misc-queries/25266-filename-length-excel-limited-92-characters.html)

PARaine

Filename length in Excel limited to 92 characters
 
Is the filename length in Excel (office XP) limited to 92 characters? I have
found this limitation today and do not no whether it is a bug or not.

Jimbola

Just tried this, I can easily go beyond 100 as the file name. Could be a
specific set-up on you ur machine.
Out of curiosity how does one end up finding that out? Are gonna save a
filename with more than 100 letters? if so why...what would the file be
called. (Totally curious here)

J

"PARaine" wrote:

Is the filename length in Excel (office XP) limited to 92 characters? I have
found this limitation today and do not no whether it is a bug or not.


Dave Peterson

I use xl2003 (but I don't think there's been a change since windows 95/xl95).

I ran this to test it.

Option Explicit
Sub testme()

Dim myStr As String
Dim iCtr As Long

For iCtr = 100 To 1000
myStr = "C:\my documents\excel\test\" & String(iCtr, "A") & ".xls"
On Error Resume Next
ThisWorkbook.SaveCopyAs Filename:=myStr
If Err.Number < 0 Then
Debug.Print "Blew up when ictr = " & iCtr _
& "--and length was: " & Len(myStr)
Exit Sub
End If
Kill myStr
Next iCtr

End Sub

I got this back:

Blew up when ictr = 188--and length was: 219

So my guess is that the filename was 92 characters, but the folder where you
saved the file extended the fullname of the file to 219 characters.

Am I close?

PARaine wrote:

Is the filename length in Excel (office XP) limited to 92 characters? I have
found this limitation today and do not no whether it is a bug or not.


--

Dave Peterson

RWN

This, from Help in w2kpro ("File Names" - "Changing"");
a.. A file name can contain up to 215 characters, including spaces. However, it is not
recommended that you create file names with 215 characters. Most programs cannot interpret
extremely long file names. File names cannot contain the following characters:
\ / : * ? " < |

I believe that the "File Name" referred to implies the full path as well as the actual
file name.

--
Regards;
Rob
------------------------------------------------------------------------
"PARaine" wrote in message
...
Is the filename length in Excel (office XP) limited to 92 characters? I have
found this limitation today and do not no whether it is a bug or not.




Biff

Remember the good old days when 8.3 was enough?

Get a grip on long file names and ridiculously long paths! <g

Makes things easier!

Biff

"PARaine" wrote in message
...
Is the filename length in Excel (office XP) limited to 92 characters? I
have
found this limitation today and do not no whether it is a bug or not.





All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com