Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Command Button Visibility
Hi folks.
I don't know how to make a Command Button visable only between specific dates. This Command Button will contain code to update members in my Volunteer Fire Department. I am in real need of an answer to this issue, even if it can't be done. Thanks for your help Keith |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button Visibility
On Feb 20, 5:37*pm, Excel_Fan <k b e r g 9 0 8 4 @ c h a r t e r . n e
t wrote: Hi folks. I don't know how to make a Command Button visable only between specific dates. This Command Button will contain code to update members in my Volunteer Fire Department. *I am in real need of an answer to this issue, even if it can't be done. Thanks for your help Keith -- Excel_Fan I seldom use commang buttons. Assign your macro to a shape and place this in the ThisWorkbook module Private Sub Workbook_Open() 'MsgBox Date If Date = DateSerial(2012, 2, 12) And _ Date < DateSerial(2012, 3, 12) Then ActiveSheet.Shapes("Rectangle 1").Visible = True Else ActiveSheet.Shapes("Rectangle 1").Visible = False End If End Sub |
#3
|
|||
|
|||
Quote:
I believe this will do what I want to do. The only other problem is that I want this to occur between Jan 1 and Jan 15 each year. I'm not sure how the code syntax should be entered to accomplish this. (I bought a book on VBA but I have difficulty grasping the formats, syntax and logic) Thanks again. KB |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button Visibility
On Thursday, March 1, 2012 11:07:18 PM UTC-6, Excel_Fan wrote:
'Don Guillett[_2_ Wrote: ;1447990']On Feb 20, 5:37*pm, Excel_Fan <k b e r g 9 0 8 4 @ c h a r t e r . n e t wrote:- Hi folks. I don't know how to make a Command Button visable only between specific dates. This Command Button will contain code to update members in my Volunteer Fire Department. *I am in real need of an answer to Try year(date) DateSerial(year(date), 1, 1) And this issue, even if it can't be done. Thanks for your help Keith -- Excel_Fan- I seldom use commang buttons. Assign your macro to a shape and place this in the ThisWorkbook module Private Sub Workbook_Open() 'MsgBox Date If Date = DateSerial(2012, 2, 12) And _ Date < DateSerial(2012, 3, 12) Then ActiveSheet.Shapes("Rectangle 1").Visible = True Else ActiveSheet.Shapes("Rectangle 1").Visible = False End If End Sub Thanks Don, I believe this will do what I want to do. The only other problem is that I want this to occur between Jan 1 and Jan 15 each year. I'm not sure how the code syntax should be entered to accomplish this. (I bought a book on VBA but I have difficulty grasping the formats, syntax and logic) Thanks again. KB -- Excel_Fan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Issue with command button visibility | Excel Programming | |||
Visibility of a command Button | Excel Programming | |||
Visibility of a command Button | Excel Programming | |||
Visibility of a command Button | Excel Programming | |||
Command Button Visibility Problem | Excel Programming |