Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have the clock (24 format) in a spreadsheet. When a user clicks a button, I would like to see the procedure executed only if it is after a certain time. ie. if it is after 17:00, then the function will run, otherwise a msg will state that it is too early. I've looked at the OnTime code, but it will not serve my purpose. Any ideas would be greatly appreciated. Thanks, WA |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
My preference for that kind of thing would be to use the ontime method. When
the spreadsheet is opened check the time and if it is after 17:00 then enable the button otherwise disable. Have the on time method enable the button at 17:00. That code is very lightweight. The nice thing about it is that the user can only click the button when it is valid to do so. No need for a message box telling the user that they can not do something that you never intended to let them complete. -- HTH... Jim Thomlinson "WA" wrote: Hi, I have the clock (24 format) in a spreadsheet. When a user clicks a button, I would like to see the procedure executed only if it is after a certain time. ie. if it is after 17:00, then the function will run, otherwise a msg will state that it is too early. I've looked at the OnTime code, but it will not serve my purpose. Any ideas would be greatly appreciated. Thanks, WA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fomula which returns the amount depending on the currency code | Excel Discussion (Misc queries) | |||
Execute vba code on cell exit | Excel Discussion (Misc queries) | |||
is there a way to schedule a macro to execute at a certain time? | Excel Discussion (Misc queries) | |||
can i execute a calculation in a cell at a certain time of the day | Excel Worksheet Functions | |||
how do you execute single line of code? | Excel Discussion (Misc queries) |