Solved

Excel 2007 VBA Save As .. File Format

Posted on 2012-03-20
3
420 Views
Last Modified: 2012-06-21
Hi

I hope you can help me with this.

I have various bits of VBA that manipulate data from different sources ready for upload into Access.  The user needs to be able to pick up the upload file, but whatever format I save it as, Excel won't recognise it to reopen it.  I've dredged the web and have tried more versions of "FileFormat:=" than you can imagine!

The code button above won't don't anything, so here's the relevant bit of code:

    uploadName = Application.GetSaveAsFilename
   
    ActiveWorkbook.SaveAs Filename:= _
        uploadName, FileFormat:=56, Password:="", WriteResPassword:="", _
        ReadOnlyRecommended:=False, CreateBackup:=False

I'm awarding 500 points for a quick answer that works.

Thanks
Sarah
0
Comment
Question by:ScuzzyJo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 37741646
Is there an extension on the end of uploadName? If so, what is it?
0
 

Author Comment

by:ScuzzyJo
ID: 37741727
Hi Rory

I hadn't put a file extension on, so I tried that and it worked fine.

Thanks...:-)

I'll close the question and award the points, but I'll have to do it via my phone as we're only allowed IE6 here and I can't see the close button on the page, so please bear with me.

I have another question too, so I'll post that in a minute.

Thanks
Sarah
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37741745
No rush. :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question