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
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,139
Messages
5,835,633
Members
430,372
Latest member
contentment

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