Fileformat not working

JamRivera

New Member
Joined
Jun 9, 2019
Messages
36
I'm extremely new to building macros so here is my situation.
We have users opening a macro enabled excel file on our intranet.
I'm trying to keep users from saving the file back to the intranet once opened. I want the user to save the file to their drive once opened. Once a user opens the file from the intranet the macro automatically opens the save as file (to a specific path). the user types in a file name. The problem is the file is saved as a file with no filetype asscoiated to the file. I'm using FileFormat:=52 but maybe I didn't place it in the correct place inmy code or I'm just using ileformat the wrong way.

Please advise anything would be helpful at this point.

Using excel 2010

here is the macro

Sub Auto_Open()
MsgBox "Save to desktop prior to working", vbInformation + vbOKOnly, "Hello Ops Team"

Dim workbook_Name As Variant
workbook_Name = Application.GetSaveAsFilename("R:\Provider Ops\Triaging for Vendors")
If workbook_Name <> False Then

ActiveWorkbook.SaveAs _
Filename:=workbook_Name, _
FileFormat:=52 (Save as Type - shows up as "All Files")


End If

End Sub
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,966
Messages
6,175,662
Members
452,666
Latest member
AllexDee

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