msoFileDialogSaveAs filter

Have the following code that is failing because of the filter:

 
Dim fd As FileDialog
Dim Title As String
Dim vrtSelectedItem As Variant

Set fd = Application.FileDialog(msoFileDialogSaveAs)

With fd
  .Filters.Clear
  .Filters.Add "Excel 2007", "*.xlsx"
  .AllowMultiSelect = False
  .Title = "Save File"
  .InitialFileName = "CI Trac.xlsx"

Open in new window


Problem is, if I don't use filters and the person renames the file without putting the .xlsx extention on the file name it won't open for them. Unless they know they did it, but we are talking some higher ups who may not know what they have done.

Is there any way I can do this? Thanks for taking a look.
LVL 1
G ScottAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RegnillobCommented:
It appears that Access does not support the SaveAs dialog, so your code may not be able to be used.

Instead, this API code is recommended to call Windows SaveAs dialog directly.

http://www.mvps.org/access/api/api0001.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
G ScottAuthor Commented:
Hey Regnillob, thanks for the reply. Yeah, I tried using that one already and it had a ton of errors. i thought before I tried to figure them out I would ask here.
0
RegnillobCommented:
Microsoft has verified that FileDialog does not support SaveAs in Access. I have found that this applies through Access 2010, so no version of access supports this.

http://support.microsoft.com/kb/282335
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Jeffrey CoachmanMIS LiasonCommented:

http://www.mvps.org/access/api/api0001.htm
<Yeah, I tried using that one already and it had a ton of errors.>

The code is fairly straightforward...

What, specifically, are you trying to save?
What errors were you getting?
0
G ScottAuthor Commented:
Nope..I got it to work. id10T error. I wasn't calling it correctly.

Thanks boaq.
0
G ScottAuthor Commented:
Thanks! Great solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.