• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Path Name

BoredBloke

Godlike
Thanks received
41
I have a bit of code which specified the path for a file to save to. Unfortunately the path is 166 characters long. The filename is a nifty little 74 characters long. Meaining that the path and filename combined is 240 characters long. Apparantly in Excel there is a limit in VBA of 218 characters for a path and file name string.

Anybody know a quick way around it.
 
"You could save it to a short filename and then have vba run a batch file to rename it."

That is kind of what I am going to do. Except I'm going to name it - part of the name is a date stamp and save it in a sub dir with a short name. Then run a batch file to move it to its final location. Still a pain in the @rse though.
 
wc2 said:
How about using the old 8.3

path c:\progra~1 etc

It still works on XP etc

Either that, or just map a drive to where you want to save it to - that should shorten your path to about, erm, three characters...
 

Advertisers

Back
Top