Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform and textboxes
Hi,
I'm working on a form which contains times and dates. I got about 40 textboxes and after each textbox there is a commandbutton which brings up a calender where people can fill out there times and dates by clicking on it and it will fill out the times in the form. This works fine for one entry in one textbox but........ I'm using a class module, I got from this forum, to call the calendar. So I got one module that is used by 40 commandbuttons for 40 different textboxes. Now I would like to achieve that I can designate for each commandbutton where the calendar puts it's values after clicking Is this possible? Anybody got any idea? Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform and textboxes
I would make the Class Module a function that returns a date. Remove from
the Class modules any direct writes to a text box and set the return value of the Class Module the date. from this Sub GetDate() textbox1.text = Date() end Sub to Function GetDate() GetDate = Date() end sub Or Pass the Name of the Textbox to the Class Module Sub GetDate(TBox as string) set tbox = oleobjects(Tbox) tbox.text = Date() end sub "Paul" wrote: Hi, I'm working on a form which contains times and dates. I got about 40 textboxes and after each textbox there is a commandbutton which brings up a calender where people can fill out there times and dates by clicking on it and it will fill out the times in the form. This works fine for one entry in one textbox but........ I'm using a class module, I got from this forum, to call the calendar. So I got one module that is used by 40 commandbuttons for 40 different textboxes. Now I would like to achieve that I can designate for each commandbutton where the calendar puts it's values after clicking Is this possible? Anybody got any idea? Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
filling userform textboxes | Excel Programming | |||
UserForm TextBoxes | Excel Discussion (Misc queries) | |||
userform & textboxes | Excel Programming | |||
userform textboxes again | Excel Programming | |||
userform textboxes | Excel Programming |