#1
|
|||
|
|||
calendar to single click on date
I have a user form, that when I pic on the date I have to click "ok' button to select it, I got a code from a guru, but it wont do it for a just clicking on the date, I get error. this is for word 2013. here is the code (this is from Trevor Eyre's date picker)
Code:
Function BasicCalendar(StartDate As Date) As String Dim oFrm As New frmDatePicker BasicCalendar = oFrm.GetDate(dateToPick:=CStr(StartDate), _ OKButton:=False, _ CancelButton:=False, _ ShowTitleBar:=False) lbl_Exit: Set oFrm = Nothing Exit Function End Function |
#2
|
||||
|
||||
I don't know anything about Trevor Eyre's date picker but that code is going nowhere fast.
If you are declaring oFrm as an existing form then that type must have been declared elsewhere and you haven't supplied that code. Perhaps we could help if you showed us where you started from.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
Trevor Eyre's date picker code is available from his web site. It is intended for Excel, but with a few minor detail modifications it works well in Word also. The code is far too long to post here and I don't have Trevor's authority to do so.
The macro above will call Trevor's userform and enable the one click process requested. However I suspect that 'chubbychub' may be using the modified version of the original available from Greg Maxey's web site (modified with Trevor's permission) and therefore the code above that I provided to 'chubbychub' privately may not work with that version. If he wishes he can contact me again via my web site and I will provide him with the details of the modifications required to make the original work with Word, or he could ask Greg for the changes required to make his modified version work as requested. P.S.I have posted the changes to the OP via e-mail.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com Last edited by gmayor; 04-04-2019 at 12:50 AM. |
#4
|
|||
|
|||
Thank you Gmayor! it works great, with me being a newbie and not knowing anything about vba, not sure which way is up or down, or left and right, just lack of knowledge on my part, never have intended to step on anyones toes, or not credit author of the code. Apologies for anything I done wrong. Thank you Gmayor and Guessed!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I create a table in Word where I can single click a cell and it automatically highlights? | QA Inspector | Word | 2 | 05-14-2015 07:22 PM |
Auto population of a single date | bremen22 | PowerPoint | 1 | 08-04-2014 11:59 AM |
Exchange - Single public calendar? | critikull | Outlook | 0 | 05-15-2012 08:18 AM |
Use a single calendar in Outlook 2010 | TimTDP | Outlook | 0 | 04-03-2012 11:30 PM |
Single-click to archive emails to dif't folders based on original folder? | Dougmeister | Outlook | 0 | 09-23-2010 01:18 PM |