two questions

viper

Active Member
Joined
Feb 15, 2002
Messages
382
First-I'll probably read how to do it later(but I can't stand reading). How do I set a text box on a userform so that when the form is open the current date is displayed?

Also, is there a way to set the cell formats so that I can leave them unprotected and the user can't change them? What I'm having trouble with(not alot) is when I have a cells format set as text and the user enters a date it changes the format to a date.
I've seen cell formats set up using VBA is that a better way to format cells, and if so can they be changed by the user?

thanks
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

stevebausch

Well-known Member
Joined
May 11, 2002
Messages
810
Textbox.value= date (date type)
or
Textbox.value=Date$ (string type)

Two different visual formats.


Place your choice in _Initialize.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,413
Messages
5,595,998
Members
414,037
Latest member
Roamingsmile

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