Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default


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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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   Report Post  
jophy j via OfficeKB.com
 
Posts: n/a
Default


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
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
Input Form vba help mdalzell Excel Discussion (Misc queries) 0 April 8th 05 03:57 PM
Creating an custom input box [email protected] Excel Worksheet Functions 1 March 17th 05 03:45 AM
what is the format for an input cell? Pumaman Excel Discussion (Misc queries) 2 February 8th 05 05:05 AM
can you input time (hh:mm:ss) without having to input the colon i. Lexicon Excel Discussion (Misc queries) 4 January 11th 05 02:09 PM
How do I match two cells and input a value in a different cell? pensfan Excel Worksheet Functions 2 November 16th 04 05:52 PM


All times are GMT +1. The time now is 11:57 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"