Consulting

Results 1 to 6 of 6

Thread: VBA Calender - Add Date to Text Value instead of Activecell

  1. #1

    VBA Calender - Add Date to Text Value instead of Activecell

    Hi Team,

    I have one vba calender the code adds date to Active cell , I need small Modification here.

    Instead of Activecell , date should be printed on Forms text box.


    So in short - Open forms from main module, Calender to pop up,

    user will select date and should get printed on Text boxes on forms, and will save that date in a Variable.


    I unable to do it on forms. Below is attached macro file.



    Thanks
    mg
    Attached Files Attached Files

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Posts
    7,669
    Location
    try this
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    Hi Paul ,

    Thanks for your help, I want calender to open after clicking on click event on forms command button,

    Whatever date select , date should be printed on text box.

    Steps
    Click on Assigned Macro Button( Shapes here)
    Forms to display
    user will fill form
    user will date via clicking Select date command which is on forms.





  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Posts
    7,669
    Location
    How does this differ?

    1.JPG

    2.JPG
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #5

    VBA Calender - Select date on form

    Hi Paul,

    Attached is the Amended file, this way I was looking,


    needs to add click event for submit and cancel,
    for submit value should printed in a cell value
    and for cancel macro shoud exit,


    But still there is some issue , date is not getting printed in a cell value.



    Thanks
    mg
    Attached Files Attached Files

  6. #6
    VBAX Sage
    Joined
    Apr 2007
    Posts
    7,669
    Location
    Uncomment this line and see if it works


            g_sDate = CDate(CmdBtnGroup.Tag)    '   <<<<<<<<<<<<<<<<<<<<<<<<<<
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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