Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on Dictionary datatype?? [email protected] Excel Programming 2 January 19th 07 04:38 PM
determining datatype davegb Excel Programming 8 December 1st 05 09:29 PM
DataType Property Access101 Excel Programming 3 August 25th 05 08:15 PM
need help- SUB: DATATYPE FOR A CELL.. monika Excel Programming 1 February 13th 04 02:13 PM
DataType Conversion AsimKhaliq Excel Programming 0 January 21st 04 12:40 AM


All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"