View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Kruncher Kruncher is offline
external usenet poster
 
Posts: 18
Default GetSaveAsFilename Troubles

On Jun 7, 8:29*pm, "Jim Cone" wrote:
Abbreviate the string...
vSaveFileFilter = "Lotus 1-2-3 rel 1 (*.wks), *.wks, " & _
* * * * * * * * * * * * "Lotus 1-2-3 rel 2 (*.wk1), *.wk1, " & _
* * * * * * * * * * * * "Lotus 1-2-3 rel 3 (*.wk3), *.wk3, " & _
* * * * * * * * * * * * "Excel (*.xls), *.xls, " & _
* * * * * * * * * * * * "Excel 2007 (*.xlsx), *.xlsx, " & _
* * * * * * * * * * * * "Access (*.mdb), *.mdb, " & _
* * * * * * * * * * * * "Paradox (*.db), *.db, " & _
* * * * * * * * * * * * "Web (*.htm;*.html), *.htm;*.html, " & _
* * * * * * * * * * * * "PDF (*.pdf), *.pdf"
--
Jim Cone
Portland, Oregon *USAhttp://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"Kruncher"
wrote in message
Thanks Jim. yeah, the string that works OK is 252, so if I add
anything... boom.
Of course, there's no mention of a limit in the help (that I could find).
So any ideas on where am I going next to do this?

On Jun 7, 7:56 pm, "Jim Cone"
wrote:



My guess is that you are up against a limit on the string length.
If the length of vSaveFileFilter is under 255 the dialog is displayed.
Add the line "MsgBox Len(vSaveFileFilter)" and see what you get.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)- Hide quoted text -


- Show quoted text -


Thanks guys. If nothing else, I'm glad my suspicion on the filter
length was confirmed.

I'll need to compromise with the less than optimal, but functional:
sSaveFileFilter = "Lotus 123 v1 (*.wks), *.wks, " & _
"123 v2 (*.wk1), *.wk1, " & _
"123 v3 (*.wk3), *.wk3, " & _
"MS XL (*.xls;*.xlsx), *.xls;*.xlsx, " & _
"Paradox (*.db), *.db, " & _
"Text (*.*), *.*, " & _
"MS Access (*.mdb), *.mdb, " & _
"dBase (*.dbf), *.dbf, " & _
"Web (*.htm;*.html), *.htm;*.html, " & _
"PDF (*.pdf), *.pdf"

That's the full set. Squeaks in at 250 characters. All that
duplication of the extensions eats up space! They couldn't have coded
it so that you only need to supply an extension once?!?!

Thanks again. Really and sincerely appreciated. On to the rest of the
it now...