Distinguished professors, can you help me? I want a code to implement the following. I have 60 textboxes in UseForm, from textbox 1 to 60 textboxes. I want a code that allows writing a date only on them and the date format is dd,mm.yyyy
Distinguished professors, can you help me? I want a code to implement the following. I have 60 textboxes in UseForm, from textbox 1 to 60 textboxes. I want a code that allows writing a date only on them and the date format is dd,mm.yyyy
Last edited by saftawy1; 01-29-2023 at 12:34 PM. Reason: change the title
Administrative Note:
We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.
Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).
Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.
(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.
sorry its dd/mm/yyyy
You could create a custom date picker / calendar that pops up when you enter a textbox and allows the user to select the required date rather than type it in.
You can then easily dictate what format that date shows as in the textboxes.
Would that work?
BSB
how can do that?
I found a code, but I don't know how to make it work automatically on textboxPlease Login or Register to view this content.
Have a look at the attached for an example of using a date picker / calendar for this.
BSB
ty BadlySpelledBuoy its good work i will try it
Hello. I show you another way to do it.
a) Look in the VBA environment at the three objects you need to use: the 'txtBox' class module, the 'uf_Date' helper userform, and the Userform1.
b) In the first two objects you do not have to do anything.
c) See in the Initialize event of Userform1 (UserForm_Initialize) the only two things you have to adapt to your needs:
d) CtrlMatrix(1 To 4) and For i = 1 To 4 where those '1 To 4' refer to the 4 textboxes that are associated with dates in the userform.
Hello everyone.
Attached a variant of what is shown in post #10.
In this case and in the sheet 'Hoja2' you can 'double-click' on any cell and the userform 'uf_Date' will be displayed to enter dates in the cells.
Spoilt for choice - another version - Class modules interact for both ID of calender keys and ID of textboxes.
Torachan,
Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.
ty torachan
ty beyond Excel
@BSB, thanks for the compliment & rep point - I have flashes of lucid inspiration late at night when sleep is impossible.
@torachan - I have similar moments, usually at 3am where I'm rudely awoken by my brain coming up with a solution to a problem I'd been trying to solve for much of the previous day's work. Daren't go back to sleep after that through fear of forgetting it!
Your solution above actually solves something I was trying to do, so I've scribbled it down in my little pad and it's coming to the office with me tomorrow
BSB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks