DateTime datatype in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
Thank you very much. Solved my problem

Jim Thomlinson said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top