Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filling userform textboxes Pierre via OfficeKB.com[_2_] Excel Programming 3 October 14th 05 08:16 PM
UserForm TextBoxes Rob Excel Discussion (Misc queries) 2 August 6th 05 03:07 AM
userform & textboxes beginner Excel Programming 3 July 27th 04 10:56 AM
userform textboxes again Jo[_6_] Excel Programming 4 October 21st 03 07:25 PM
userform textboxes Jo[_6_] Excel Programming 4 October 21st 03 07:15 PM


All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"