+ Reply to Thread
Results 1 to 10 of 10

Date in the UserForm

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Question Date in the UserForm

    I 'm going to make a small data base using a populate UserForm for data entry. I have a pop up calendar for my expiry date entry but i dont know how to made it to show the date in the UserForm instead of the cell in the worksheet. Can someone help to figure out the problem???
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date in the UserForm

    There's no code or userform in the workbook you uploaded, just a button that doesn't work.

    Did you upload the correct workbook?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Wink Re: Date in the UserForm

    Quote Originally Posted by Norie View Post
    There's no code or userform in the workbook you uploaded, just a button that doesn't work.

    Did you upload the correct workbook?
    Sorry that i selected the wrong file, and here it is... calendar1.xlsm
    Last edited by Leith Ross; 07-10-2013 at 02:19 PM.

  4. #4
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Date in the UserForm

    can anyone give me some help...

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date in the UserForm

    Which userform is it you are referring to?
    Attached Files Attached Files
    Last edited by Norie; 07-10-2013 at 01:38 PM.

  6. #6
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Date in the UserForm

    Dear Norie,

    Thanks for your kindly help! I will like to input the data into the Log worksheet but i m stuck by the pop-up calendar. Can you tell me the changes you've done?

    Kevin
    Attached Files Attached Files

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date in the UserForm

    Kevin

    Firstly, do the changes work?

  8. #8
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Date in the UserForm

    yes....its work perfectly.....and i have copy all the script into my another file but in vain....it cant show the date ~.~

    I found 2 changes in the code..
    1 With frm_EnterData2.Expiry
    .Value = CDate(CmdBtnGroup.Tag)
    End With
    GoTo chg_month

    2. Sub addDate()
    ' frm_EnterData2.Expiry.Value = re
    End Sub

    its there anythings i omitted?

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Date in the UserForm

    What do you mean it can't show the date?

    Where?

    I made quite a few changes, for example you had this to show the pop-up when the Expiry textbox was double clicked in.
    Please Login or Register  to view this content.
    I changed that to this.
    Please Login or Register  to view this content.
    Then I put a call to Show_Cal in the Initialize event of frmCalendar2 and removed frmCalendar2.Show from Show_Cal.
    Please Login or Register  to view this content.
    In the class cCmdButtons I made the change you've just posted, though I probably would have changed some other things there - the code's a bit higgeldy piggeldy.

    I commented out the line of code in adddate because as far as I can see it wasn't doing anything - probably should have deleted the sub.

    That's all I changed really, there was no code to put the data from the userform on the worksheet.

  10. #10
    Registered User
    Join Date
    08-07-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Date in the UserForm

    Dear Norie,

    I really appreciate your detail explanation which help me learn a lot. Thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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