Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
hello, I have 2 forms one for basic stock item details and the other is the vb calender. When clicking the calender i would like it to populate my combobox "date1.text". when i am in my stock item form and i'm editing code i can press ctrl+spacebar and it will give me a list of valid objects (including my date1 box) but when i am editing the calender code all the boxes from my other form aren't there. Ultimately, when running the calender with "date1.text" in the code, there are errors. I am sure this is a schoolboy error and would appreciate some education!! thanks in advance for your help John -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391689 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
Hi John,
Do you have a reason for not putting the Calendar control in the same form as the ComboBox? Assuming that you do, in the Userform2's Calendar click event, add : UserForm1.Date1.Value = Me.Calendar1.Value --- Regards, Norman "johncassell" wrote in message ... hello, I have 2 forms one for basic stock item details and the other is the vb calender. When clicking the calender i would like it to populate my combobox "date1.text". when i am in my stock item form and i'm editing code i can press ctrl+spacebar and it will give me a list of valid objects (including my date1 box) but when i am editing the calender code all the boxes from my other form aren't there. Ultimately, when running the calender with "date1.text" in the code, there are errors. I am sure this is a schoolboy error and would appreciate some education!! thanks in advance for your help John -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391689 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
Thanks for the reply Norman, I havent tried that code yet but sure it will work. I have a combobox which hopefully will call the calender when the drop-down button is clicked, I assumed that the calender had to be a separate form. Am i right in thinking this? Thanks again for the reply -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391689 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
Hi John,
I assumed that the calender had to be a separate form. Am i right in thinking this? No. Given your description, I would only use a single form. If you use a single form, the code line becomes: Me.Date1.Value = Me.Calendar1.Value --- Regards, Norman "johncassell" wrote in message ... Thanks for the reply Norman, I havent tried that code yet but sure it will work. I have a combobox which hopefully will call the calender when the drop-down button is clicked, I assumed that the calender had to be a separate form. Am i right in thinking this? Thanks again for the reply -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391689 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
Yes that worked Norman... cheers , however I have a small problem. Afte the calender has put the date in my date box and i press enter, th calender pops up again, it also pops up if i use the mouse to move t the next box. Can you help with this please?? Thanks again for replyin -- johncassel ----------------------------------------------------------------------- johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501 View this thread: http://www.excelforum.com/showthread.php?threadid=39168 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem accessing control in another form
Hi John,
Post the userrform code. --- Regards, Norman "johncassell" wrote in message ... Yes that worked Norman... cheers , however I have a small problem. After the calender has put the date in my date box and i press enter, the calender pops up again, it also pops up if i use the mouse to move to the next box. Can you help with this please?? Thanks again for replying -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391689 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
Tool Tip Text for Form control/ Active-X control | Excel Programming | |||
Set Focus Problem for textbox control on multipage control | Excel Programming | |||
Accessing the values of form controls on worksheets in Excel 2000 | Excel Programming | |||
Accessing ActiveX Controls using VBA - can't use Control.Name to access. | Excel Programming |