SaveAs File Type

christian2016

Board Regular
Joined
Oct 6, 2016
Messages
123
Hi Guys,

In excel I save the file type as "Test".

Putting quotation marks around Test allows me to save the file type as a basic file.

Through VBA i'm unable to get this to work correctly

Example save path
C:\Temp\Testing"Test"

This gives me an error and i believe in may have something to do with the quotation marks.

Is there any way to save file type as a plain file.

Any help is greatly appreciated

Thanks
 
GOTHIM!!!

Ran this:

Code:
Sub Macro2()'
' Macro2 Macro
'
Dim fstring As Long
Dim fname As Long


fname = 1
fstring = 0




On Error Resume Next
'
Do Until fname = 1000


    ActiveWorkbook.SaveAs Filename:= _
        "C:\Users\andrew.marshall\Desktop\Testing\" & fname, FileFormat:=fstring
        
fname = fname + 1
fstring = fstring + 1
Loop
        


End Sub

It is FileFormat 42

Code:
    ActiveWorkbook.SaveAs Filename:= _
        "C:\Users\andrew.marshall\Desktop\Testing\yes", FileFormat:=42
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top