Macro to change default setting on startup

  • Thread starter Thread starter paankadu
  • Start date Start date
P

paankadu

I am in need of a macro that can change a default setting in excel and for it
to run on startup


The task is:
Tools
Options
General
Web Options
Files
uncheck Update links on save


Below is the recording of the macro:

With ActiveWorkbook.WebOptions
..RelyOnCSS = True
..OrganizeInFolder = True
..UseLongFileNames = True
..DownloadComponents = False
..RelyOnVML = False
..AllowPNG = False
..ScreenSize = msoScreenSize800x600
..PixelsPerInch = 96
..Encoding = msoEncodingWestern
End With
With Application.DefaultWebOptions
..SaveHiddenData = True
..LoadPictures = True
..UpdateLinksOnSave = False
..CheckIfOfficeIsHTMLEditor = True
..AlwaysSaveInDefaultEncoding = False
..SaveNewWebPagesAsWebArchives = True
End With

End Sub

It is set in a module and I would like it to run on startup. By saving it in
the originial document it will carry over to each version that is saved.

Thanks in advance for your assistance
Angie
 
Back in the macro editor go to the ThisWorkbook module. Paste this in:

Sub Workbook_Open()
Application.DefaultWebOptions.UpdateLinksOnSave = False
End Sub
 
Paankadu -

Set the name of the macro to Auto_Open. Look at the RunAutoMacros method in
VBA Help in Excel (help from the code window).
 
Back
Top