Home |
Search |
Today's Posts |
#1
|
|||
|
|||
HOW TO PASS THE VALUE TO CORRECT INPUT BOX ?
Hi, I am a new member in this group.. I have some dificulties in form's date input box. I am trying to get date from a calendar and there are two date input box. How do I pass the dates into respective input boxs. How do I check the cursor whether is in Textbox1 or Textbox2 ? |
#2
|
|||
|
|||
Not quite clear on this.
When a control is invoked (entered), the events for that control fire. So normally you would add code to the events for the specific control. So, the user would type into Textbox1 say, and you could code in the Change, Exit events, or any of the other events associated with a textbox. -- HTH Bob Phillips "jophy j via OfficeKB.com" wrote in message ... Hi, I am a new member in this group.. I have some dificulties in form's date input box. I am trying to get date from a calendar and there are two date input box. How do I pass the dates into respective input boxs. How do I check the cursor whether is in Textbox1 or Textbox2 ? |
#3
|
|||
|
|||
Thanks Bob Phillip for your prompt reply... Still Iam not clear.. I have coded as follows Private Sub Calendar_Click() If userform2.textbox5.tabindex=9 UserForm2.TextBox5.Text = Calendar.Value else UserForm2.TextBox6.Text = Calendar.Value endif Unload Me End Sub Calendar invokes when a button press.. Once you select date ,this date should move to appropriate input boxes as there are two input date box.. I have created two buttons (to popup calendar) near each inputbox. When I click first button,the date shoud go to textbox5 and click on the secon button should go to textbox6. Regards Jophy Bob Phillips wrote: Not quite clear on this. When a control is invoked (entered), the events for that control fire. So normally you would add code to the events for the specific control. So, the user would type into Textbox1 say, and you could code in the Change, Exit events, or any of the other events associated with a textbox. Hi, I am a new member in this group.. I have some dificulties in form's date input box. I am trying to get date from a calendar and there are two date input box. How do I pass the dates into respective input boxs. How do I check the cursor whether is in Textbox1 or Textbox2 ? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200507/1 |
#4
|
|||
|
|||
Jophy,
This works according to your code, but your description differs, when you say two buttons to fire your calendar. Do you have two calendar controls, and are they hidden until you click the buttons. #Private Sub Calendar1_Click() With Me If .TextBox5.TabIndex = 9 Then .TextBox5.Text = Calendar1.Value Else .TextBox6.Text = Calendar1.Value End If End With End Sub BTW unloading the form in the click event doesn't seem like a good idea, you will never see the result. -- HTH Bob Phillips "jophy j via OfficeKB.com" wrote in message ... Thanks Bob Phillip for your prompt reply... Still Iam not clear.. I have coded as follows Private Sub Calendar_Click() If userform2.textbox5.tabindex=9 UserForm2.TextBox5.Text = Calendar.Value else UserForm2.TextBox6.Text = Calendar.Value endif Unload Me End Sub Calendar invokes when a button press.. Once you select date ,this date should move to appropriate input boxes as there are two input date box.. I have created two buttons (to popup calendar) near each inputbox. When I click first button,the date shoud go to textbox5 and click on the secon button should go to textbox6. Regards Jophy Bob Phillips wrote: Not quite clear on this. When a control is invoked (entered), the events for that control fire. So normally you would add code to the events for the specific control. So, the user would type into Textbox1 say, and you could code in the Change, Exit events, or any of the other events associated with a textbox. Hi, I am a new member in this group.. I have some dificulties in form's date input box. I am trying to get date from a calendar and there are two date input box. How do I pass the dates into respective input boxs. How do I check the cursor whether is in Textbox1 or Textbox2 ? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200507/1 |
#5
|
|||
|
|||
Thanks Vey much ! Bob Bob Phillips wrote: Jophy, This works according to your code, but your description differs, when you say two buttons to fire your calendar. Do you have two calendar controls, and are they hidden until you click the buttons. #Private Sub Calendar1_Click() With Me If .TextBox5.TabIndex = 9 Then .TextBox5.Text = Calendar1.Value Else .TextBox6.Text = Calendar1.Value End If End With End Sub BTW unloading the form in the click event doesn't seem like a good idea, you will never see the result. Thanks Bob Phillip for your prompt reply... Still Iam not clear.. I have coded as follows [quoted text clipped - 29 lines] two date input box. How do I pass the dates into respective input boxs. How do I check the cursor whether is in Textbox1 or Textbox2 ? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200507/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Input Form vba help | Excel Discussion (Misc queries) | |||
Creating an custom input box | Excel Worksheet Functions | |||
what is the format for an input cell? | Excel Discussion (Misc queries) | |||
can you input time (hh:mm:ss) without having to input the colon i. | Excel Discussion (Misc queries) | |||
How do I match two cells and input a value in a different cell? | Excel Worksheet Functions |