1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| 'CODE FROM OTHER USER FOR DISABLING EXCEL FEATURES
Sub HideAllMenus(app As Excel.Application)
With app
.DisplayFormulaBar = False
.DisplayStatusBar = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
If CDbl(.Version) >= 12.0# Then
If .ExecuteExcel4Macro("Get.ToolBar(7,""Ribbon"")") Then
.ExecuteExcel4Macro("Show.ToolBar(""Ribbon"", False)")
End If
End If
End With
End Sub
'CODE FROM OTHER USER FOR DISABLING EXCEL FEATURES
Sub HideRowColHeadings(wb As Excel.Workbook)
Dim window As Excel.window
For Each window In wb.Windows
window.DisplayHeadings = False
Next
End Sub |