Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Ok, I have solved it myself. *If there is a better method please tell me guys*. Also, I preferred to use a custom toolbar. I added the following code to my *Retrieve *button: 'This stores the retrieved date in a distant cell(in my case it is AF5:AH5) 'I have named the cells containing date as Date, Month & Year With Sheets("Master") ..Range("AF5") = Range("Date") ..Range("AG5") = Range("Month") ..Range("AH5") = Range("Year") End With Then I added the following code to the *worksheet_calculate *event procedu If Range("Date") < Range("AF5") Or Range("Month") < Range("AG5") Or Range("Year") < Range("AH5") Then Application.CommandBars("My Tool Bar").Controls("Store").Enabled = False Else Application.CommandBars("My Tool Bar").Controls("Store").Enabled = True End If So, if the retrieved date does not match with the change in calendar(which happens when the user changes the date) the *store *button is disabled and the user will not click it accidentally and spoil the database. It is working fine for me. -- lotus ------------------------------------------------------------------------ lotus's Profile: http://www.excelforum.com/member.php...o&userid=23759 View this thread: http://www.excelforum.com/showthread...hreadid=493216 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
disable brian baulsom's worksheet change based on cell value. | Excel Worksheet Functions | |||
how to disable listbox change event | Excel Programming | |||
Enable/Disable Worksheet Change Event code | Excel Programming | |||
Disable Change Event in Form | Excel Programming | |||
Disable Worksheet change event | Excel Programming |