access vba to delete excel hide/delete column (1 Viewer)

bigmac

Registered User.
Local time
Today, 02:12
Joined
Oct 5, 2008
Messages
295
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:
 

Cronk

Registered User.
Local time
Today, 19:12
Joined
Jul 4, 2013
Messages
2,774
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

Top Bottom