Excel 2007 Save As menu customizeable ?

N

notawahoo

I often want to save a worksheet as a .csv file which makes it easily
transferrable to our mainframe. Can I customize the "Save As" menu in Excel
2007 to include CSV as a choice, instead of always having to navigate through
the "Other Formats"?

TIA,
 
R

Ron de Bruin

Hi Nancy

Yes that is possible

You must use a add-in with xml to do this
I will post a example for you after dinner
 
R

Ron de Bruin

Ok, I asume that you want to save the active sheet

First start with this page so you can test it first
http://www.rondebruin.nl/ribbonx20072010.htm

You can do both (2007 and 2010) or only for 2007

If you got the tester working you can replace the example macro with this macro below
We also can add the button after SaveAs or in it and change the image of the button.

But first try this example so you can see if it is working for you

Sub Macro1(control As IRibbonControl)
Dim fname As Variant
Dim Wb As Workbook

ActiveSheet.Copy
Set Wb = ActiveWorkbook
Again:
fname = Application.GetSaveAsFilename("", _
fileFilter:="CSV Files (*.csv), *.csv")
If fname = False Then Exit Sub
If Dir(fname) <> "" Then GoTo Again
Wb.SaveAs fname, 6
Wb.Close False
End Sub
 
R

Ron de Bruin

Maybe this macro is better so it close the sheet if you cancel the dialog

Sub Macro1(control As IRibbonControl)
Dim fname As Variant
Dim Wb As Workbook

ActiveSheet.Copy
Set Wb = ActiveWorkbook
Again:
fname = Application.GetSaveAsFilename("", _
fileFilter:="CSV Files (*.csv), *.csv")
If fname = False Then
Wb.Close False
Exit Sub
End If
If Dir(fname) <> "" Then GoTo Again
Wb.SaveAs fname, 6
Wb.Close False
End Sub
 
N

Nancy

Thanks for all your help, Ron. To be honest, I haven't tried your code
that would alter the ribbon yet. I work at a large organization with
tightly controlled software rollouts, so I will have to ask for (and
get) "administrative rights" on my pc first.

Again, THANKS!

Nancy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top