access vba to delete excel hide/delete column

bigmac

Registered User.
Local time
Today, 06:23
Joined
Oct 5, 2008
Messages
302
hi all can you help please, i have a form on which is a number of tick boxes relating to columns that are on an excel sheet that is produced when i click a button on the form , how do i get the sheet to be produced so if tick box1 is true then tthe column that is assosiated to is either hidden or deleted :confused:
 
In the after_update event of your check box

Code:
if me.chkYourTickBox = true then
    xlApp.columns("a:a").select
     xlApp.selection.columnWidth = 0
    ' or xlApp.selection.delete
endif
 

Users who are viewing this thread

Back
Top Bottom