Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateTime datatype in VBA
Hello.
When i am trying to use DateTime Datatype in my VBA macro, it gives me "Automation type not supported by visual basic" do i have to add some kind of reference to the specific library ? i cannot find any information on this. Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateTime datatype in VBA
Try using just Date. It supports both Date and Time...
-- HTH... Jim Thomlinson "Alex" wrote: Hello. When i am trying to use DateTime Datatype in my VBA macro, it gives me "Automation type not supported by visual basic" do i have to add some kind of reference to the specific library ? i cannot find any information on this. Thank you |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateTime datatype in VBA
Hello Jim.
First of all thank you for responding so quickly. I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format and a value in minutes for example 2 then i will make 2 minute sql statements to find out min/max of certain value over that period of time so i need to manipulate datetime i couldnt find anything for date datatype that can be equal to DateTime.AddMinutes "Jim Thomlinson" wrote: Try using just Date. It supports both Date and Time... -- HTH... Jim Thomlinson "Alex" wrote: Hello. When i am trying to use DateTime Datatype in my VBA macro, it gives me "Automation type not supported by visual basic" do i have to add some kind of reference to the specific library ? i cannot find any information on this. Thank you |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateTime datatype in VBA
Sorry about taking so long to get back to you (meetings). Try something like
this... Dim dte As Date dte = Now() MsgBox dte dte = dte + TimeSerial(0, 2, 0) MsgBox dte -- HTH... Jim Thomlinson "Alex" wrote: Hello Jim. First of all thank you for responding so quickly. I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format and a value in minutes for example 2 then i will make 2 minute sql statements to find out min/max of certain value over that period of time so i need to manipulate datetime i couldnt find anything for date datatype that can be equal to DateTime.AddMinutes "Jim Thomlinson" wrote: Try using just Date. It supports both Date and Time... -- HTH... Jim Thomlinson "Alex" wrote: Hello. When i am trying to use DateTime Datatype in my VBA macro, it gives me "Automation type not supported by visual basic" do i have to add some kind of reference to the specific library ? i cannot find any information on this. Thank you |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
DateTime datatype in VBA
Thank you very much. Solved my problem
"Jim Thomlinson" wrote: Sorry about taking so long to get back to you (meetings). Try something like this... Dim dte As Date dte = Now() MsgBox dte dte = dte + TimeSerial(0, 2, 0) MsgBox dte -- HTH... Jim Thomlinson "Alex" wrote: Hello Jim. First of all thank you for responding so quickly. I am trying to get start/end dates from user in dd-mm-yyyy hh:mm:ss format and a value in minutes for example 2 then i will make 2 minute sql statements to find out min/max of certain value over that period of time so i need to manipulate datetime i couldnt find anything for date datatype that can be equal to DateTime.AddMinutes "Jim Thomlinson" wrote: Try using just Date. It supports both Date and Time... -- HTH... Jim Thomlinson "Alex" wrote: Hello. When i am trying to use DateTime Datatype in my VBA macro, it gives me "Automation type not supported by visual basic" do i have to add some kind of reference to the specific library ? i cannot find any information on this. Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help on Dictionary datatype?? | Excel Programming | |||
determining datatype | Excel Programming | |||
DataType Property | Excel Programming | |||
need help- SUB: DATATYPE FOR A CELL.. | Excel Programming | |||
DataType Conversion | Excel Programming |