Sub SetFormat()
'many options are commented out - uncomment them if you want tem to be applied.
With ActiveSheet.Cells
.HorizontalAlignment = xlLeft
'.VerticalAlignment = xlBottom
'.WrapText = False
'.Orientation = 0
'.AddIndent = False
'.IndentLevel = 0
'.ShrinkToFit = False
'.ReadingOrder = xlContext
'.MergeCells = False
With .Font
.Name = "Arial"
.Size = 10
.Bold = False
'.Strikethrough = False
'.Superscript = False
'.Subscript = False
'.OutlineFont = False
'.Shadow = False
'.Underline = xlUnderlineStyleNone
'.ThemeColor = xlThemeColorLight1
'.TintAndShade = 0
'.ThemeFont = xlThemeFontNone
End With
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
'Will trigger if the content of cells are changed
SetFormat
End Sub
Private Sub Worksheet_activate()
'Will trigger when a different worksheet is shown
SetFormat
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim lX As Long
Dim sActiveSheet As String
Application.EnableEvents = False
Application.ScreenUpdating = False
sActiveSheet = ActiveSheet.Name
For lX = 1 To Worksheets.Count
Worksheets(lX).Activate
SetFormat
Next
Sheets(sActiveSheet).Activate
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub