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
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
This works for me.

Code:
    ActiveWorkbook.SaveAs Filename:= _
        "C:\Temp\Testing.test"
 
Last edited:
Upvote 0
Sorry the directory path should be

C:\Temp\Testing \ "Test"

How am i able to save this as a basic file type.

Thanks for your help
 
Last edited:
Upvote 0
Code:
ActiveWorkbook.SaveAs Filename:= _
        "C:\Temp\Testing\Test.test"

?

Directory is "C:\Temp\Testing"
File is"Test"
Extension is ".test"
 
Last edited:
Upvote 0
nah so the extension should be a a basic file extension.

Example when I save it in the dialog save as box as "Test" it will save with a file type extension as File.
 
Upvote 0
There's a communication barrier here I cannot seem to get past. Maybe an Excel version issue giving us different visuals.

The above will save it as ".txt" (what happens when the extension is ".test"). Not sure what "basic" or "file" extensions are.

When you save as:

File name: Test?
Save as type: is what?

Alternatively, Have you tried the macro recorder?
 
Last edited:
Upvote 0
So basically i need it to save the file type as a windows generic file extension which is a file with no extension.

Web definition
A FILE is a generic file extension that may be appended to a Windows file that does not have an extension. It is an unknown file type and no associated program will automatically open it.

Yes tried the macro recorded unable to get it working the way i want it to.
 
Last edited:
Upvote 0
Ok, kind of following now, apologies.

How's this? actually saves it as a FILE File.


Code:
ActiveWorkbook.SaveAs Filename:= _
        "C:\Temp\Testing\test.file"
 
Last edited:
Upvote 0
yer done that but i need it not to show the File file extension.

I have been going crazy seems the only way is for the dialog box to open and the user to type the correct format.

I can't seem to achieve the same result in other way
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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