Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 517
  • Last Modified:

Type-Declaration character does not match declared data type Error Using Time$

Hi.

I get Type-Declaration character does not match declared data type when the following line of code tries to execute:

Txt_Log.Text = Txt_Log.Text & Time$ & " - Com Port " & ComPort & " Opened."

I tried just copying this line to an empty program and it works fine... So what else could be causing the problem?

Thanks
0
Dormouse31
Asked:
Dormouse31
1 Solution
 
eric0213Commented:
All looks pretty standard... Maybe try CStr(Time) instead of Time$ though I don't see why that'd be a problem...
0
 
Dang123Commented:
Can you post the function the line is in?
0
 
Dormouse31Author Commented:
Thanks for the help, but I just figured it out. I stupidly had a variable named Time...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Richie_SimonettiIT OperationsCommented:
Time is a reserved word, are you using it as a variable name?
0
 
Dormouse31Author Commented:
Yeah... I was. i fixed it
0
 
Richie_SimonettiIT OperationsCommented:
That's OK, just see posting time for each comment. Cheers
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now