Solved

Excel 2007 VBA Save As .. File Format

Posted on 2012-03-20
3
425 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

691 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