Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Hide Combo Box

I need the syntax for hiding and showing a combo box in VB. I can get it to
hide using:

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = False

But when I try to use

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = True

It won't let me see it (Get VB error). I think this is because I need to
turn on the Design Mode. Does anyone know the syntax to do that / solve
this problem. Thank you.







  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Hide Combo Box

Eliminate the select as you can't select a non-visible item:
ActiveSheet.Shapes("ComboBox3").Visible = True

Charles Chickering

Troubled User wrote:
I need the syntax for hiding and showing a combo box in VB. I can get it to
hide using:

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = False

But when I try to use

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = True

It won't let me see it (Get VB error). I think this is because I need to
turn on the Design Mode. Does anyone know the syntax to do that / solve
this problem. Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Hide Combo Box

To add on to this, you can use one macro to do both functions.

If ActiveSheet.Shapes("ComboBox1").Visible = False _
Then
ActiveSheet.Shapes("ComboBox1").Visible = True
Else:
ActiveSheet.Shapes("ComboBox1").Visible = False

End If


"Die_Another_Day" wrote in message
oups.com...
Eliminate the select as you can't select a non-visible item:
ActiveSheet.Shapes("ComboBox3").Visible = True

Charles Chickering

Troubled User wrote:
I need the syntax for hiding and showing a combo box in VB. I can get it
to
hide using:

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = False

But when I try to use

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = True

It won't let me see it (Get VB error). I think this is because I need to
turn on the Design Mode. Does anyone know the syntax to do that / solve
this problem. Thank you.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hide Combo Box

With ActiveSheet.Shapes("ComboBox1")
.Visible = Not .Visible
End with

--
Regards,
Tom Ogilvy

"PCLIVE" wrote in message
...
To add on to this, you can use one macro to do both functions.

If ActiveSheet.Shapes("ComboBox1").Visible = False _
Then
ActiveSheet.Shapes("ComboBox1").Visible = True
Else:
ActiveSheet.Shapes("ComboBox1").Visible = False

End If


"Die_Another_Day" wrote in message
oups.com...
Eliminate the select as you can't select a non-visible item:
ActiveSheet.Shapes("ComboBox3").Visible = True

Charles Chickering

Troubled User wrote:
I need the syntax for hiding and showing a combo box in VB. I can get
it to
hide using:

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = False

But when I try to use

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = True

It won't let me see it (Get VB error). I think this is because I need
to
turn on the Design Mode. Does anyone know the syntax to do that /
solve
this problem. Thank you.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Hide Combo Box

Just wanted to say that a short search through the threads has again saved me
hours of headache.
This was exactly what I was looking for, thank you all so much!

teabag


"Tom Ogilvy" wrote:

With ActiveSheet.Shapes("ComboBox1")
.Visible = Not .Visible
End with

--
Regards,
Tom Ogilvy

"PCLIVE" wrote in message
...
To add on to this, you can use one macro to do both functions.

If ActiveSheet.Shapes("ComboBox1").Visible = False _
Then
ActiveSheet.Shapes("ComboBox1").Visible = True
Else:
ActiveSheet.Shapes("ComboBox1").Visible = False

End If


"Die_Another_Day" wrote in message
oups.com...
Eliminate the select as you can't select a non-visible item:
ActiveSheet.Shapes("ComboBox3").Visible = True

Charles Chickering

Troubled User wrote:
I need the syntax for hiding and showing a combo box in VB. I can get
it to
hide using:

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = False

But when I try to use

ActiveSheet.Shapes("ComboBox3").Select
Selection.Visible = True

It won't let me see it (Get VB error). I think this is because I need
to
turn on the Design Mode. Does anyone know the syntax to do that /
solve
this problem. Thank you.






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
hide combo box JD Excel Discussion (Misc queries) 6 February 17th 09 06:34 PM
Hide Combo Boxes AJ Excel Worksheet Functions 0 October 11th 06 04:22 AM
Hide combo 3 based on combo1 harpscardiff[_27_] Excel Programming 7 May 18th 06 10:52 AM
Hide my combo boxes! hays4 Excel Discussion (Misc queries) 6 November 7th 05 02:45 PM
Combo Box - Hide Combo Box w/Check Box Paul Excel Programming 5 December 3rd 04 10:58 PM


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