To turn off worksheet tabs in Excel, follow these steps:
Method 1: Hide all sheet tabs except active sheet tab using VBA code | Method 2 : Hide all sheet tabs except active sheet tab using macro |
1. | < p class = MsoNormal align = center \ r \ nstyle = 'text - align : center' > < span lang = EN - US \ r \ nstyle = 'font - size : 10\.0 pt \ r \ nsans - serif' > 2\. Open Microsoft Excel\. Click on Developer tab\. If you can not see Developer tab, please go to Method 3\. In Developer tab, click on Macro button\. This will open Macro dialog box\. In Macro dialog box, click on Options button\. This will open Macro Options dialog box\. Check Trust access to the VBA project object model option and then click OK button twice to close both dialog boxes\<\/span\ ><\/ p ><\/ td ><\/ tr ><\/ tbody ><\/ table >< p class = MsoNormal align = center \ r \ nstyle = 'text - align : center' > < span lang = EN - US \ r \ nsans - serif' > 3\< o : p / > Open Microsoft Excel\< br / > Click on File\< br / > Click on Options\< br / > In Excel Options dialog box , click on Customize Ribbon option in left sidebar\< br / > Check Developer option under Main Tabs section at right side and then click OK button\<\/span\ ><\/ p >< p class = MsoNormal align = center \ r \ nsans - serif' > 4\< o : p / > Now you can see Developer tab is visible at ribbon bar\< br / > Click on Developer tab\< br / > Click on Visual Basic button\< br / > This will open Visual Basic Editor window\< br / > In Visual Basic Editor window , double click on Sheet1 ( Sheet1 is default name of first worksheet ) object in Project Explorer pane ( at left side )\< br / > This will open code window for Sheet1 object\< br / > Copy and paste below code into code window and then save and close this file\<\/span\ ><\/ p >< table border = 1 cellspacing = 1 cellpadding = 1 width=\" 100 %\" bordercolor=\"#000000\" bgcolor=\"#FFFFFF\" \" \" \" \" \" \" \" \" \" \" \\t\\t\\t\\t\\t\\t\\t\\t \\t \\t \\t \\t \\t \\t \\t private sub worksheet_selectionchange(byval target as range)\\r\\n dim sh as worksheet\\r\\n for each sh in thisworkbook.worksheets\\r\\n sh.visible=true\\r\\n next sh\\r\\ntarget.parent.visible=false\\\\r\\\\nsaveandclose true\\\\r\\\\nexit sub\\\\r\\\\nerrorhandler::saveandclose false\\\\r\\\\nexitsub\\\\r\\\\nsaveandclose(byval flag as boolean) if flag then thisworkbook.save else thisworkbook.close end if end sub\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\">Move beyondExcelGet started with Causal today. Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals. |