Consulting

Results 1 to 3 of 3

Thread: Solved: Active Control or text box ???

  1. #1
    VBAX Mentor jammer6_9's Avatar
    Joined
    Apr 2007
    Location
    Saudi Arabia
    Posts
    318
    Location

    Solved: Active Control or text box ???

    I am having 20 text boxes in a userform (my Mainform), In each "KeyPress" event of the text box, I am calling a "Monthview Calendar" that is in another userform and what I wanted is when I click on the calendar, the value should go to that active text box... How can I do that?

    [vba]
    Private Sub MonthView1_DateClick(ByVal DateClicked As Date)

    frmMain.ActiveControl.Value = calendar.MonthView1.Value
    Me.Hide

    End Sub

    [/vba]
    T-ogether
    E-veryone
    A-chieves
    M-ore


    One who asks a question is a fool for five minutes; one who does not ask a question remains a fool forever.

  2. #2
    Could post the workbook or take a gander at the thread: http://vbaexpress.com/forum/showthread.php?t=17939

    In Leave_Request_1.7.xls he does exactly what you want.

    If you open the file click the button "Submit Leave Request Form" and double click in the "start" textbox.

    Then examine the code behind it, it's pretty easy

    Cheers
    ___________________________________
    g-
    gwkenny@Fin-ITSolutions.com
    ___________________________________

  3. #3
    VBAX Mentor jammer6_9's Avatar
    Joined
    Apr 2007
    Location
    Saudi Arabia
    Posts
    318
    Location
    Definitely it gives me what I wanted... Thanks...

    Quote Originally Posted by gwkenny
    Could post the workbook or take a gander at the thread: http://vbaexpress.com/forum/showthread.php?t=17939

    In Leave_Request_1.7.xls he does exactly what you want.

    If you open the file click the button "Submit Leave Request Form" and double click in the "start" textbox.

    Then examine the code behind it, it's pretty easy

    Cheers
    T-ogether
    E-veryone
    A-chieves
    M-ore


    One who asks a question is a fool for five minutes; one who does not ask a question remains a fool forever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •