Event procedure on Complete date

Riaang

Board Regular
Joined
Aug 29, 2002
Messages
146
Hi,

Can anybody give me the event procedure if I want a date to appear once the user has ticked the comleted box on the form.

The date must be locked so that it is system generated and not changed by the user.

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Assuming that you have a field for the date called [txtDate] which is locked, and a checkbox called chkDone then the following should do what you want.

Private Sub chkDone_Click()
If Me![chkDone] = True And IsNull(Me![txtDate]) Then
Me![txtDate].Locked = False
Me![txtDate] = Now()
Me![txtDate].Locked = True
End If
End Sub

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,551
Messages
6,160,460
Members
451,648
Latest member
SuziMacca

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