AfterUpdate with DTPicker Control

terryw

New Member
Joined
Apr 27, 2006
Messages
45
Does anyone know how to make the AfterUpdate event work with the DTPicker control? It is availible as an option, but it appears to do nothing.

My problem is that I want to be able to use the dtpicker OR manually input the date and not have any code run until after the update is made.

If I use the change event only, code runs each time a user manipulates the calander... this is pretty annoying. Also, if I use the the CloseUp event, the calander works great but the code does not run when dates are input manually.

Last, I would prefer not to use the Exit event, since I need my code to run as soon as an update is made with the control.

In a nutshell, the AfterUpdate event would be perfect....if it would only work.

Can anyone help?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

sunnyland

Well-known Member
Joined
Jan 27, 2006
Messages
912
Hello there,

You could go as follow:
Meaning when the user click enter the code run.
If you go this way don't put a linked cell value
Put some code in the keydown event


Private Sub DTPicker1_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
'key enter pressed
If KeyCode = vbKeyReturn Then
'your code
'range("a15")=dtpicker1.value
End If
End Sub
 

Forum statistics

Threads
1,136,878
Messages
5,678,320
Members
419,755
Latest member
eshnider21

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top