?
Solved

Excel 2007 VBA Save As .. File Format

Posted on 2012-03-20
3
Medium Priority
?
429 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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 …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

752 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