Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-14-2017, 03:23 AM   #1
bigmac
Newly Registered User
 
Join Date: Oct 2008
Location: wales
Posts: 220
Thanks: 55
Thanked 0 Times in 0 Posts
bigmac is on a distinguished road
Question access vba to delete excel hide/delete column

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

bigmac is offline   Reply With Quote
Old 09-14-2017, 11:16 AM   #2
Cronk
Newly Registered User
 
Join Date: Jul 2013
Posts: 1,571
Thanks: 2
Thanked 338 Times in 334 Posts
Cronk will become famous soon enough
Re: access vba to delete excel hide/delete column

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
Cronk is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Duplicates in One Column in Excel after Access Export JMarcus General 2 05-12-2016 10:40 AM
VBA to delete Excel data after import to Access? SazzleTWG Modules & VBA 2 12-19-2012 01:47 AM
Access VBA delete entire column or columns and shift lef in Excel jydbman Queries 24 11-10-2010 05:15 AM
Delete Excel Records from Access skwilliams Modules & VBA 8 10-31-2008 08:20 AM
Delete a Column in Excel File. ian_w Modules & VBA 1 10-15-2008 05:59 AM




All times are GMT -8. The time now is 09:10 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World