Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Max
 
Posts: n/a
Default How can I hide check box created via FORMS together with column?

Hey guys, how can I hide a check box created using FORMS together with column
it is placed in (or in some other way). "Move and size with cell" option is
not active in object positioning for check boxes created via FORMS as opposed
to those created via CONTROL TOOLBOX.

Thanks,
Max
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think you'll have better luck (pronounced easier time!) with the checkboxes
from the Control toolbox toolbar.

But maybe you could have a macro that hides the columns/rows and also looks at
the objects to see if they should be .visible = false.

And the same kind of macro to make the checkbox's visibility true.





Max wrote:

Hey guys, how can I hide a check box created using FORMS together with column
it is placed in (or in some other way). "Move and size with cell" option is
not active in object positioning for check boxes created via FORMS as opposed
to those created via CONTROL TOOLBOX.

Thanks,
Max


--

Dave Peterson
  #3   Report Post  
Max
 
Posts: n/a
Default

Thanks Dave!

ActiveSheet.Shapes("Check Box 1").Select
Selection.Visible = True

This thing hid the checkbox but alternative one

ActiveSheet.Shapes("Check Box 1").Select
Selection.Visible = False

does not help with making it visible again.

Actually what I need is to hide unchecked boxes by unpressing toggle button
and show all of them again by pressing it. I've done it for rows, but all
these checkboxes overlapping each other look ugly.

Else 'the button is unpressed

For rwindex = 20 To 217
For colIndex = 10 To 10
With Worksheets("KPI").Cells(rwindex, colIndex)
If .Value = False Then Worksheets("KPI").Rows(rwindex).Select
Selection.EntireRow.Hidden = True
range(cells(rwindex,10),cells(rwindex,10).
End With
Next colIndex
Next rwindex

I will really appreciate if you can help me to upgrade this stuff to enable
hiding/unhiding checkboxes.

Thanks!

"Dave Peterson" wrote:

I think you'll have better luck (pronounced easier time!) with the checkboxes
from the Control toolbox toolbar.

But maybe you could have a macro that hides the columns/rows and also looks at
the objects to see if they should be .visible = false.

And the same kind of macro to make the checkbox's visibility true.





Max wrote:

Hey guys, how can I hide a check box created using FORMS together with column
it is placed in (or in some other way). "Move and size with cell" option is
not active in object positioning for check boxes created via FORMS as opposed
to those created via CONTROL TOOLBOX.

Thanks,
Max


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

So you're making a routine that will look at each checkbox and hide/show the row
based on the checkbox that's located in a cell in that row?

I'm not quite sure how you're going to show that row--since the checkbox will be
hidden and unavailable for changing???

But maybe something like this to hide the rows:
Option Explicit
Sub HideRows()
Dim myCBX As CheckBox
For Each myCBX In ActiveSheet.CheckBoxes
If myCBX.Value = xlOn Then
myCBX.Visible = False
myCBX.TopLeftCell.EntireRow.Hidden = True
End If
Next myCBX
End Sub

And something like this to show the rows, unhide the checkboxes and clear them:

Sub ShowAllRows()
With ActiveSheet
.Rows.Hidden = False
With .CheckBoxes
.Visible = True
.Value = xlOff
End With
End With
End Sub

Max wrote:

Thanks Dave!

ActiveSheet.Shapes("Check Box 1").Select
Selection.Visible = True

This thing hid the checkbox but alternative one

ActiveSheet.Shapes("Check Box 1").Select
Selection.Visible = False

does not help with making it visible again.

Actually what I need is to hide unchecked boxes by unpressing toggle button
and show all of them again by pressing it. I've done it for rows, but all
these checkboxes overlapping each other look ugly.

Else 'the button is unpressed

For rwindex = 20 To 217
For colIndex = 10 To 10
With Worksheets("KPI").Cells(rwindex, colIndex)
If .Value = False Then Worksheets("KPI").Rows(rwindex).Select
Selection.EntireRow.Hidden = True
range(cells(rwindex,10),cells(rwindex,10).
End With
Next colIndex
Next rwindex

I will really appreciate if you can help me to upgrade this stuff to enable
hiding/unhiding checkboxes.

Thanks!

"Dave Peterson" wrote:

I think you'll have better luck (pronounced easier time!) with the checkboxes
from the Control toolbox toolbar.

But maybe you could have a macro that hides the columns/rows and also looks at
the objects to see if they should be .visible = false.

And the same kind of macro to make the checkbox's visibility true.





Max wrote:

Hey guys, how can I hide a check box created using FORMS together with column
it is placed in (or in some other way). "Move and size with cell" option is
not active in object positioning for check boxes created via FORMS as opposed
to those created via CONTROL TOOLBOX.

Thanks,
Max


--

Dave Peterson


--

Dave Peterson
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
Forms Check Box Font Size gjs Excel Discussion (Misc queries) 2 February 2nd 05 05:37 PM
How do I hide the outline of a Forms Group Box? MadTodd Excel Discussion (Misc queries) 7 January 17th 05 05:45 PM
check off, look up forms - VERY confused Abi Excel Discussion (Misc queries) 1 January 8th 05 01:47 AM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM
Has anyone created forms in Excel with drop down boxes? mcdanik Excel Worksheet Functions 5 November 21st 04 04:04 PM


All times are GMT +1. The time now is 12:29 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"