Then, this code above loops through all userforms in your project until it finds one that matches the label for the Userform (lblUF) and the label for the textbox needed (lblCtrlName).Īlso, you may need to enable Microsoft Windows Common Controls -2 6. VBA Code: Step 1 Open a Word File Step 2 Press ALT+F11 Step 3 Click on Insert>Module Step 4 Paste the above code in the VBA. 1.) The name of the userform that called it and 2.) The name of the control or textbox that needs the date sent to it. This userform cleverly has two labels to store relevant info on the Userform that summoned it. Macro example to set font color to Automatic. Format your column dd-mmm-yy (see attached file click in column C2 downwards. Old November 29th 06, 07:58 AM posted to. Leave the format as ShortDate or LongDate it does not always accept some of the Custom Formats. When you double-click the control you’ll see the following code which is the DateClick event of that control: Re: Date Picker Date Formats The datepicker is notoriously unstable if used on the sheet - use it as intended on a UserForm. In the downloadable workbook, you’ll see the control was renamed to ‘fCal’. Start by creating a userform and enabling the control by Right-clicking on the Tools menu and click Add additional tools It’s a little old school looking, but actually has quite a nice feel to it. Check out this ActiveX control by Microsoft that allows users to do just that. This is no different for Excel developers. Oftentimes, users want to click a button and select a date.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |