File Dialog with Default Value that has Spaces

CedarTree

Registered User.
Local time
, 23:35
Joined
Mar 2, 2018
Messages
417
Hello - using a file dialog (generally works fine) but it truncates a file name when I put in a default value with spaces. I've tried Chr(34)+DefaultPath+Char(34) and also tried replacing any spaces with %20. No luck so far. Any suggestions? Thanks!
 
I just gave it a try, and nothing was truncated. :unsure:
 
Hmmm... the filename has a "!" at the beginning... would that impact things?
 
Hmmm... the filename has a "!" at the beginning... would that impact things?
Just tried it with a ! in the beginning of the file name, but it still worked.
1730130606049.png

1730130613442.png
 
Very strange. I would end up getting "Only.accdb". PS, I also have an "!" in the beginning of the final folder name (e.g., \TDS Economy\ in your example, would be \!TDS Economy\, but that shouldn't impact things I would think.
 
Very strange. I would end up getting "Only.accdb". PS, I also have an "!" in the beginning of the final folder name (e.g., \TDS Economy\ in your example, would be \!TDS Economy\, but that shouldn't impact things I would think.
Right. It didn't matter when I added the ! to the folder's name.
1730132238940.png
 
Hmmm... the filename has a "!" at the beginning... would that impact things?
Just because you CAN do something, doesn't mean its a good idea!
Definitely don't ever use apostrophes in file names even though they are also allowed
Doing that will cause a lot of issues in VBA code
 
It's just the !, not really "!". But also these are the filenames that a client sent us.
 

Users who are viewing this thread

Back
Top Bottom