Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Checkbox to Hide Column G

Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.

Im using office 2003.
______________________


Private Sub CheckBox20_Click()

If CheckBox20 = True Then
Columns("G").Hidden = True
Else
Columns("G").Hidden = False
End If

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Checkbox to Hide Column G

try this:

Private Sub CheckBox20_Click()

If CheckBox20 = True Then
activesheet.Columns("G").Hidden = True
Else
activesheet.Columns("G").Hidden = False
End If

End Sub

:)
susan




On Oct 23, 1:26*pm, Charlie wrote:
Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.

Im using office 2003.
______________________

Private Sub CheckBox20_Click()

If CheckBox20 = True Then
* * Columns("G").Hidden = True
Else
* * Columns("G").Hidden = False
End If

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Checkbox to Hide Column G

hi
i just plugged your code into my 2003 and it works??????
what problems are you haveing with it.

regards
FSt1

"Charlie" wrote:

Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.

Im using office 2003.
______________________


Private Sub CheckBox20_Click()

If CheckBox20 = True Then
Columns("G").Hidden = True
Else
Columns("G").Hidden = False
End If

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Checkbox to Hide Column G

hrmm...Still does absolutely nothing when checked and unchecked.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Checkbox to Hide Column G

i have a check box with that code in it but it does absolutely nothing when i
check it or uncheck it, no error, no column hiding nothing.

-Charlie

"FSt1" wrote:

hi
i just plugged your code into my 2003 and it works??????
what problems are you haveing with it.

regards
FSt1

"Charlie" wrote:

Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.

Im using office 2003.
______________________


Private Sub CheckBox20_Click()

If CheckBox20 = True Then
Columns("G").Hidden = True
Else
Columns("G").Hidden = False
End If

End Sub



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Checkbox to Hide Column G

it worked when i tested it (excel 2000 win xp) using a control toolbox
checkbox....... i just changed the coding to checkbox1 to match my
checkbox.
maybe you are using a forms checkbox?
susan


On Oct 23, 1:58*pm, Charlie wrote:
i have a check box with that code in it but it does absolutely nothing when i
check it or uncheck it, no error, no column hiding nothing.

-Charlie



"FSt1" wrote:
hi
i just plugged your code into my 2003 and it works??????
what problems are you haveing with it.


regards
FSt1


"Charlie" wrote:


Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.


Im using office 2003.
______________________


Private Sub CheckBox20_Click()


If CheckBox20 = True Then
* * Columns("G").Hidden = True
Else
* * Columns("G").Hidden = False
End If


End Sub- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Checkbox to Hide Column G

Aghh haah! that was it, I grabbed the wrong checkbox. boo... Thanks!

"Susan" wrote:

it worked when i tested it (excel 2000 win xp) using a control toolbox
checkbox....... i just changed the coding to checkbox1 to match my
checkbox.
maybe you are using a forms checkbox?
susan


On Oct 23, 1:58 pm, Charlie wrote:
i have a check box with that code in it but it does absolutely nothing when i
check it or uncheck it, no error, no column hiding nothing.

-Charlie



"FSt1" wrote:
hi
i just plugged your code into my 2003 and it works??????
what problems are you haveing with it.


regards
FSt1


"Charlie" wrote:


Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.


Im using office 2003.
______________________


Private Sub CheckBox20_Click()


If CheckBox20 = True Then
Columns("G").Hidden = True
Else
Columns("G").Hidden = False
End If


End Sub- Hide quoted text -


- Show quoted text -



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Checkbox to Hide Column G

This sounds like something that would happen to me... seemingly harmless
normal code - not working!

I would try opening a new workbook, add a checkbox, double click it and add
the code. Set a breakpoint on the event and step through the click. If that
works, then I would go through your original workbook and double check for a
naming error. When I first tried your code, I added CheckBox1 to my workbook
and clicked on it but pasted your code referencing Checkbox20 and it didn't
work until I caught the naming conflict.

John

"Charlie" wrote:

Any Reason why this does not give error or a response? I built it with help
from this forum and everything seems right. Im stumped.

Im using office 2003.
______________________


Private Sub CheckBox20_Click()

If CheckBox20 = True Then
Columns("G").Hidden = True
Else
Columns("G").Hidden = False
End If

End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
use checkbox to hide rows ScottB Excel Discussion (Misc queries) 2 August 20th 08 01:05 PM
checkbox to hide/show row [email protected] Excel Programming 1 December 14th 07 10:26 AM
Hide & Unhide with a Checkbox Jonathan Excel Programming 5 October 5th 05 12:16 PM
hide rows from checkbox Qaspec Excel Programming 1 May 25th 05 10:32 PM
Hide / Unhide Columns with checkbox Sige Excel Programming 4 May 9th 05 11:43 AM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"