Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shapes.visible = false/true


This macro just worked, it hid most of my combo boxes and list boxes
However now Im getting an error when trying to select the hidden comb
boxes.... is it not possible to select ( .visible = false ) shapes. Fo
so to make them visable again?


Private Sub Number_CC_invloved()

' Hides/Unhides the other forms depending on how many numbers of c
invloved.
' Created by Christian Simonsen 21/03/2006
Dim mSheet
Dim mCombo
Dim mList

i = data.Range("K14").Value

'------------------ Hides/Unhides all forms --------------

' unhides all the forms
For n = 2 To 10
mSheet = "Sheet" & n
Range(mSheet).Select
Selection.EntireRow.Hidden = False
Next n


' hides all the forms which is not needed
For i = i + 1 To 10
mSheet = "Sheet" & i
Range(mSheet).Select
Selection.EntireRow.Hidden = True

Next i


' -----------Hides all combo boxes and List boxes ---------

' unhides all the combo boxes
For n = 2 To 10
mCombo = "CC_" & n
combo.Shapes(mCombo).Select
With Selection
.Visible = True
End With
Next n

' unhides all the List boxes
For n = 2 To 10
mList = "cboSecondary_" & n
combo.Shapes(mList).Select
With Selection
.Visible = True
End With
Next n

' -----------Un-Hides all combo boxes and List boxes ---------

' hides all the forms which is not needed
For i = i + 1 To 10
mList = "CC_" & i
combo.Shapes(mList).Select
With Selection
.Visible = False
End With
Next i

' hides all the forms which is not needed
For i = i + 1 To 10
mList = "cboSecondary_" & i
combo.Shapes(mList).Select
With Selection
.Visible = False
End With
Next i



End Su


--
Ctec

-----------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774
View this thread: http://www.excelforum.com/showthread.php?threadid=52487

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shapes.visible = false/true


So can I not make a shape visible again after making it invisible

--
Ctec

-----------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774
View this thread: http://www.excelforum.com/showthread.php?threadid=52487

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Shapes.visible = false/true

This works for the shapes on the worksheet and toggles the visible state on/off.

With ActiveSheet.DrawingObjects
.Visible = Not .Visible = msoTrue
End With


Regards
Robert McCurdy

"Ctech" wrote in message ...

This macro just worked, it hid most of my combo boxes and list boxes.
However now Im getting an error when trying to select the hidden combo
boxes.... is it not possible to select ( .visible = false ) shapes. For
so to make them visable again?


Private Sub Number_CC_invloved()

' Hides/Unhides the other forms depending on how many numbers of cc
invloved.
' Created by Christian Simonsen 21/03/2006
Dim mSheet
Dim mCombo
Dim mList

i = data.Range("K14").Value

'------------------ Hides/Unhides all forms --------------

' unhides all the forms
For n = 2 To 10
mSheet = "Sheet" & n
Range(mSheet).Select
Selection.EntireRow.Hidden = False
Next n


' hides all the forms which is not needed
For i = i + 1 To 10
mSheet = "Sheet" & i
Range(mSheet).Select
Selection.EntireRow.Hidden = True

Next i


' -----------Hides all combo boxes and List boxes ---------

' unhides all the combo boxes
For n = 2 To 10
mCombo = "CC_" & n
combo.Shapes(mCombo).Select
With Selection
.Visible = True
End With
Next n

' unhides all the List boxes
For n = 2 To 10
mList = "cboSecondary_" & n
combo.Shapes(mList).Select
With Selection
.Visible = True
End With
Next n

' -----------Un-Hides all combo boxes and List boxes ---------

' hides all the forms which is not needed
For i = i + 1 To 10
mList = "CC_" & i
combo.Shapes(mList).Select
With Selection
.Visible = False
End With
Next i

' hides all the forms which is not needed
For i = i + 1 To 10
mList = "cboSecondary_" & i
combo.Shapes(mList).Select
With Selection
.Visible = False
End With
Next i



End Sub



--
Ctech


------------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
View this thread: http://www.excelforum.com/showthread...hreadid=524874

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
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
Search for 2 true arguments and return true or false David Excel Discussion (Misc queries) 3 July 15th 06 10:18 AM
Function to return True/False if all are validated as True by ISNU Tetsuya Oguma Excel Worksheet Functions 2 March 15th 06 10:28 AM
Reverse false and combine with true true value Emmie99 Excel Worksheet Functions 5 August 17th 05 04:38 PM
True Or False, no matter what... it still displays the false statement rocky640[_2_] Excel Programming 2 May 13th 04 04:57 PM


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