Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Northern NY USA
Posts: 3
Default Command Button Invisible

I have a spreadsheet of names that need to be sorted ONLY between the dates of January 1 and January 15 each year. I have a command button with a macro to do that and it works fine. I want the Command Button to become invisible (and also disabled) for the remainder of the year, then become visible and enabled January 1 the next year. Is this possible? I have no idea how to approach this task. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Command Button Invisible

I have a spreadsheet of names that need to be sorted ONLY between the
dates of January 1 and January 15 each year. I have a command button
with a macro to do that and it works fine. I want the Command Button
to become invisible (and also disabled) for the remainder of the
year, then become visible and enabled January 1 the next year. Is
this possible?


Yes/Yes if it's an ActiveX button from the Controls Toolbox. Yes/No if
it's a button from the Forms controls as these don't have an Enabled
property...

With ActiveSheet.CommandButton1
.Visible = False: .Enabled = False
End With 'ActiveSheet.CommandButton1

...though if you hide it I don't see why you need to disable it!

ActiveSheet.Shapes("Button 1").Visible = False

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Visual Basic - Invisible Command Chris Stammers Excel Programming 3 May 28th 09 01:43 PM
Visual Basic - Invisible Command Jacob Skaria Excel Programming 0 May 28th 09 12:13 PM
command button invisible upon opening file Joe Excel Programming 2 January 28th 08 07:32 PM
Command Button Invisible JR_06062005[_2_] Excel Programming 8 August 17th 06 08:37 PM
How do I make a command button invisible or visible? Mandora Excel Programming 3 February 17th 05 08:40 PM


All times are GMT +1. The time now is 08:01 AM.

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

About Us

"It's about Microsoft Excel"