Solved

Excel 2007 VBA Save As .. File Format

Posted on 2012-03-20
3
414 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
  • 2
3 Comments
 
LVL 85

Accepted Solution

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

Author Comment

by:ScuzzyJo
Comment Utility
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
Comment Utility
No rush. :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now