+ Reply to Thread
Results 1 to 6 of 6

VBA - Showing Date Picker Result in Cell!

  1. #1
    Registered User
    Join Date
    12-23-2019
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    VBA - Showing Date Picker Result in Cell!

    I am having trouble with showing the result of a calendar function (date picker by Trevor Eyre) selected from within a form (‘Entry Form’) and then have the result merged into a cell.
    From the date picker code there is a dateVariable, however when I add this to my code string the result do not show.

    If I use the calenderForm.getdate the result merges the date correctly, however when I close the form using the ‘Continue’ button the calendar reappears. So, the result is good but having the calendar reappear is not ideal.

    Any help is greatly appreciated, and file attached.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: VBA - Showing Date Picker Result in Cell!

    Hi,

    i dont have the problem that the calender reappears

    but i can see that every time you choose a date from both buttons they overwrite the first line in your data

    the chosen date are not visible on your form and this might make it difficult to see what you selected as a user

    i think you need to put the date variable in to global vars so you can access them when you write them
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: VBA - Showing Date Picker Result in Cell!

    I initially had similar problems, the way I overcame them is in the file attached as I found methods in your app confused.
    I never place data onto the sheet item by item, always with a dedicated transfer button placing all UserForm data to sheet in one operation.
    See the 'patient record' app done sometime past for a poster on this site - it utalises one of the Trevor Eyre date pickers - you can refer to the code to see method adopted.
    However in recent months I use my own 'datepicker' developed by plagiarising techniques used by other developments, it is far less code heavy.
    When used in a userform it can be used in multiple locations as the 'btnclass' module places the date in the 'active' textbox (i.e.which ever one you have 'clicked' in).
    torachan.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: VBA - Showing Date Picker Result in Cell!

    give it a look maybe this gets you going


    because you use a table i use this info to adjust you file
    https://www.bluepecantraining.com/po...ith-vba-macro/
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-23-2019
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: VBA - Showing Date Picker Result in Cell!

    Fantastic thank you for the replies.

    Joske920, what will the next step be to show the 'from' and 'to' dates in the merge field in column I?

  6. #6
    Registered User
    Join Date
    12-23-2019
    Location
    Australia
    MS-Off Ver
    365
    Posts
    13

    Re: VBA - Showing Date Picker Result in Cell!

    I found the resolution to my last question. Thank you.

+ 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. [SOLVED] If formula is not showing the result of the DATE
    By Jesus Huerta in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-03-2021, 12:31 PM
  2. Replies: 1
    Last Post: 02-14-2020, 04:41 PM
  3. Replies: 1
    Last Post: 10-16-2019, 12:08 PM
  4. [SOLVED] Date range formula showing with VALUE or 0 result
    By Aisling in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-15-2019, 11:47 AM
  5. [SOLVED] Date picker calendar on userform showing Error
    By Anisusa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2017, 12:23 PM
  6. Cell with Formula Not Showing Date - Only Showing Serial Number
    By jbb89777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2016, 04:33 AM
  7. Slicer for table with date column showing wrong result
    By p3rlend in forum Excel General
    Replies: 1
    Last Post: 04-24-2016, 06:37 AM

Tags for this Thread

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