Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DTPicker Bug | Excel Programming | |||
DTpicker | Excel Programming | |||
Save default dtpicker value | Excel Programming | |||
Save default dtpicker value | Excel Programming | |||
DTPicker | Excel Programming |