How do I insert the date into a label with VBA?
-
i have a label called lblDate and when someone opens the form i want this label to insert the data. however, when once the form is filled out, other people need to look at it, and i dont want the date to update to whatever date they open it on. EG someone fills the form out today, on the form load lblDate.caption = date... but if i open the form tomorrow to see what someone has written in it, i dont want it to update to tomorrows date. any ideas???? thanks
-
Answer:
Depends on what application you're working with. For example if you're using MS Access you can just set the default value of the date field to the current date, using the date() function, in table designer.
Carl at Yahoo! Answers Visit the source
Other answers
Depends on what application you're working with. For example if you're using MS Access you can just set the default value of the date field to the current date, using the date() function, in table designer.
How Would I Know
I assume you are working with a VBA Userform, since you a referring to a 'label' and a 'form'. If so, and you close the form with the Unload command, Excel releases the data from memory and the form will reopen with null values in all fields. Therefore, there must be more to your scenario....
garbo7441
You can store the current date in table and load it in to the label next time.
Sovandara
I assume you are working with a VBA Userform, since you a referring to a 'label' and a 'form'. If so, and you close the form with the Unload command, Excel releases the data from memory and the form will reopen with null values in all fields. Therefore, there must be more to your scenario....
garbo7441
You can store the current date in table and load it in to the label next time.
Sovandara
Related Q & A:
- How can I insert posted data into the database?Best solution by Stack Overflow
- How can I insert image in my Yahoo profile?Best solution by Yahoo! Answers
- How can I insert a picture in Email without attaching it?Best solution by Super User
- How do i insert a picture in an article on Wikipedia?Best solution by Yahoo! Answers
- How do I insert a picture into an actual mail message?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.