insert date in multiple textboxes

novice1

Board Regular
Joined
Dec 11, 2007
Messages
146
I have one multiple userforms with multiple textboxes. I also have one calendar (non-activex) that I'm using to enter dates in both sheets and userform textboxes. i currently have this code in all the buttons for each date...

Code:
Private Sub D1_Click()
    ThisButton = D1.ControlTipText
    ChkDate
    ActiveCell.Value = ThisButton
    Unload Me
End Sub

I tried to use the below code to enter the date whereever the cursor happens to be located at the time (whether on a sheet or in a textbox of a userform, but it doesn't like it. Can someone assist

Code:
target.Value = ThisButton
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Watch MrExcel Video

Forum statistics

Threads
1,130,444
Messages
5,642,172
Members
417,259
Latest member
gtacw

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