Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2019, 02:11 PM
chubbychub chubbychub is offline calendar to single click on date Windows 10 calendar to single click on date Office 2013
Novice
calendar to single click on date
 
Join Date: Feb 2019
Posts: 5
chubbychub is on a distinguished road
Default 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
if someone caould help me please.
Reply With Quote
  #2  
Old 04-03-2019, 02:52 PM
Guessed's Avatar
Guessed Guessed is offline calendar to single click on date Windows 10 calendar to single click on date Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 04-03-2019, 09:19 PM
gmayor's Avatar
gmayor gmayor is offline calendar to single click on date Windows 10 calendar to single click on date Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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.
Reply With Quote
  #4  
Old 04-06-2019, 02:53 PM
chubbychub chubbychub is offline calendar to single click on date Windows 10 calendar to single click on date Office 2013
Novice
calendar to single click on date
 
Join Date: Feb 2019
Posts: 5
chubbychub is on a distinguished road
Default

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!
Reply With Quote
Reply



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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft