Screen Updating = False Reset Work Sheet Reset Active Window Reset Application Controls Application. Window State = xl Maximized ' xl Maximized or xl Normal End With End With Active Sheet. Display Workbook Tabs = False End With Command Bars("Worksheet Menu Bar").Screen Updating = True End Sub Sub Clear Work Sheet() With Active Window . Set Background Picture ("")End Sub Sub Clear Active Window() With Active Window . Enabled = True End Sub Okay, you'll notice that only Clear All is run.Status Bar = "" End Sub Excel VBA Developer having around 8 years of experience in using Excel and VBA for automating the daily tasks, reports generation and dashboards preparation.Upon running a macro in Excel that opens a User Form, you are presented with the form, but all the toolbars, scrollbars, gridlines and other unsightly things are still visible in the background.
Situation 1: When you are deleting a sheet using VBA, Excel popup a warning message.Status Bar = "Start Printing the Numbers" 'Print numbers For icntr = 1 To 5000 Cells(icntr, 1) = icntr 'Printing the Progress Application.Status Bar = " Please wait while printing the numbers " & round((icntr / 5000 * 100),0) & "%" Next 'Make sure that you are clearing the Status bar once you are done with your task Application. This code places the cursor off screen and then scrolls the sheet back up to view If you are really wanting 'nothing selected`, you can use VBA to protect the sheet at the end of your code execution, which will cause nothing to be selected. Selecting a cell off screen will set focus there, so that won't work in and of itself.