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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
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
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,617
Members
449,039
Latest member
Mbone Mathonsi

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
Back
Top