![]() |
DTPicker Default value
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 |
DTPicker Default value
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 |
DTPicker Default value
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 |
DTPicker Default value
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 |
DTPicker Default value
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 |
All times are GMT +1. The time now is 12:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com