

To that end, I have made some assumptions.
:max_bytes(150000):strip_icc()/ManageCharts-5bd099a2c9e77c0051f8229d.jpg)
I have inferred from you wish to avoid dialogs and most interaction from the narrative 'I don't bother to read but it's getting tiring to click No or Cancel each time' and that you happily accept the defaults and simply wish to Save-to-CSV with as little interaction as possible. A regular save operation with Ctrl+ s is unaffected. There are two 'helper' routines to enable and disable the Ctrl+ Shift+ S keystroke combination. This also has the effect of removing from the Macro Name: list in the Macro Run dialog. The macro has an optional worksheet parameter to expand its use to other coded routines. Parent.SaveAs Filename:=fn, FileFormat:=xlCSV, Local:=TrueĪpplication.MacroOptions Macro:="no_training_wheels", ShortcutKey:="S", _ĭescription:="Alternate Save-to-CSV without warnings"Īpplication.MacroOptions Macro:="no_training_wheels", ShortcutKey:="", _ If LCase(fn) = "false" Then fn = Environ("TEMP") & Chr(92) &. InitialFileName:=Environ("USERPROFILE") & Chr(92) & ActiveSheet.Name, _įileFilter:="Comma Separated Value files (*.csv), *.csv") Parent.Path & Chr(92) & Left(.Parent.Name & Chr(46), InStr(1. If CBool(Application.CountA(.Cells)) Thenįn =. Sub no_training_wheels(Optional ws As Worksheet)
Excel keyboard shortcut for save as code#
Using a Personal.xlsb has been suggested embedding into a macro-enabled template is another and of course, you can simply put them into a module code sheet within the workbook you are currently processing. The best place to put the following will depend somewhat on your individual situation, of which little has been provided. However, there is nothing to stop you from expanding its usefulness by assigning a new Save-As-CSV to Ctrl+ Shift+ S. If you are using Ctrl+ s habitually, then it is probably unwise to rewrite that keystroke combination.
