+ Reply to Thread
Results 1 to 9 of 9

Adding value to the text field in userform based on the Calenndar UserForm

  1. #1
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    Adding value to the text field in userform based on the Calenndar UserForm

    Hi,

    I have uploaded a file with two Userforms: WystawWniosek and Calendarfrm.

    The Calendarfrm is a userform that opens a calendar where we can pick up a date.

    Whtat I want to do now is to open Calendarfrm when I click on field txtStartfrom and and the same time I want to leave the pickud value there.

    So, when I click on 1st of Januafy the date appears in the field txtStartFrom.

    Could you please give me a solution for this problem.

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    https://www.excelforum.com/excel-pro...d-mm-yyyy.html

    some answers in this thread

  3. #3
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    Thanks, but I cannot see the answer to my problem in this thread.

    Could you indicate which part refers to that?

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    The last attachment from jindon contains the code to transfer data from the calendar userform controls to the database userform

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    I hope the attached would help both of you.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    Thank you!

    This is just what I needed.

  7. #7
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    jindon, lovely job...many thanks

    You have the command button associated with the textbox to direct the value back to the textbox

    Rather than adding 20 or so command buttons, if the calendar was launched from a textbox enter event, could the calendar or textbox be set to receive the value dynamically ie: if calendar launched from Textbox12 then calender value is written back to Textbox12 ????
    Ill work away at the command buttons but would be so much cleaner if that possible
    Last edited by nigelog; 05-26-2017 at 08:36 AM.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,518

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    Change event of TextBox in this case is not a good idea, I think.
    If change TextBox to Label control, it has Click event, that I prefer.
    Attached Files Attached Files

  9. #9
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Adding value to the text field in userform based on the Calenndar UserForm

    Thanks Jindon
    I'll Work with that...
    Appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Text Field in Userform not showing Date
    By JJFletcher in forum Excel General
    Replies: 3
    Last Post: 10-30-2014, 07:26 AM
  2. [SOLVED] Adding text to sheet from userform
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 01-12-2014, 11:26 PM
  3. [SOLVED] UserForm in Excel- need to write code to auto fill a text field
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2013, 10:58 AM
  4. [SOLVED] Autofilter - Macro to Return Value in Userform Field based upon Most Recent Date
    By Southfish in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-01-2012, 12:57 AM
  5. [SOLVED] Copy Data loaded via Userform to a worksheet named in 1 field of the Userform
    By audax48 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-15-2012, 01:44 PM
  6. Adding text boxes in userform
    By jcarstens in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2009, 02:23 AM
  7. userform: trasnferring textbox value to label field in next userform
    By brillison in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2008, 08:18 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1