PC Review


Reply
Thread Tools Rate Thread

DTPicker Default value

 
 
=?Utf-8?B?a2oxMzU=?=
Guest
Posts: n/a
 
      5th Sep 2007
I've created a macro in Excel 2003 and I'm using DTPicker for the user to
select the date and time. For some reason the date and time defaults to when
the macro was written. How do I tell it to default to Now?

I've tried "DTPicker1.Value = Now", but for some reason it does not work.

Thanks inadvance for your help.

Steve
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UHJhbmF2IFZhaWR5YQ==?=
Guest
Posts: n/a
 
      5th Sep 2007
try using Now.Date
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"kj135" wrote:

> I've created a macro in Excel 2003 and I'm using DTPicker for the user to
> select the date and time. For some reason the date and time defaults to when
> the macro was written. How do I tell it to default to Now?
>
> I've tried "DTPicker1.Value = Now", but for some reason it does not work.
>
> Thanks inadvance for your help.
>
> Steve

 
Reply With Quote
 
=?Utf-8?B?UHJhbmF2IFZhaWR5YQ==?=
Guest
Posts: n/a
 
      5th Sep 2007
my earlier post may not work. I think just try
DTPicker1.Value =Date

--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"kj135" wrote:

> I've created a macro in Excel 2003 and I'm using DTPicker for the user to
> select the date and time. For some reason the date and time defaults to when
> the macro was written. How do I tell it to default to Now?
>
> I've tried "DTPicker1.Value = Now", but for some reason it does not work.
>
> Thanks inadvance for your help.
>
> Steve

 
Reply With Quote
 
=?Utf-8?B?a2oxMzU=?=
Guest
Posts: n/a
 
      6th Sep 2007
Thanks for the help, but that did not work, maybe I'll try some other way to
input the date.

"Pranav Vaidya" wrote:

> my earlier post may not work. I think just try
> DTPicker1.Value =Date
>
> --
> Pranav Vaidya
> VBA Developer
> PN, MH-India
> If you think my answer is useful, please rate this post as an ANSWER!!
>
>
> "kj135" wrote:
>
> > I've created a macro in Excel 2003 and I'm using DTPicker for the user to
> > select the date and time. For some reason the date and time defaults to when
> > the macro was written. How do I tell it to default to Now?
> >
> > I've tried "DTPicker1.Value = Now", but for some reason it does not work.
> >
> > Thanks inadvance for your help.
> >
> > Steve

 
Reply With Quote
 
=?Utf-8?B?QWxsZW4gR2VkZGVz?=
Guest
Posts: n/a
 
      18th Oct 2007
It works for me when I put it under UserForm_Initialize()

ex:

Private Sub UserForm_Initialize()
DTPicker1.Value = Now
End Sub




"kj135" wrote:

> I've created a macro in Excel 2003 and I'm using DTPicker for the user to
> select the date and time. For some reason the date and time defaults to when
> the macro was written. How do I tell it to default to Now?
>
> I've tried "DTPicker1.Value = Now", but for some reason it does not work.
>
> Thanks inadvance for your help.
>
> Steve

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DTPicker Default Date srm Microsoft Outlook Form Programming 0 10th Dec 2009 12:59 PM
Save default dtpicker value White Horse Microsoft Excel Programming 0 12th Mar 2007 08:17 PM
Save default dtpicker value White Horse Microsoft Excel Programming 1 12th Mar 2007 08:01 PM
DTPicker Default Date =?Utf-8?B?TGFtYmkwMDA=?= Microsoft Access Form Coding 2 13th Feb 2007 01:26 PM
How to set the DTPicker default value thru VBA =?Utf-8?B?R2FicmllbA==?= Microsoft Access 1 1st Oct 2004 11:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:38 PM.