Assuming you want one button to hide the data and another to show it (or you will have to manually highlight the columns and right-click -> unhide...
To hide...
Insert a button from the control toolbox. Right-Click -> View Properties...rename the button ("caption") and format it how you want it. Now right-click the button and choose "View Code". Type HideColumns where the cursor is active. This will assign the above code to that button.
To re-show the columns
Again...go through same steps as before as to creating the button and formating. After "View Code" the name will be ShowColumns.
Use your macro recorder. Despite some unnecessary code, its a great way to learn. And I am sure that there is a one-line code to do what you wanted, but this will definately do the trick. See attached for code and reference. Hope this helps.
Bookmarks