Solved

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

Posted on 2003-10-27
6
357 Views
Last Modified: 2013-12-03
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
Comment
Question by:Dormouse31
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Expert Comment

by:eric0213
ID: 9628829
All looks pretty standard... Maybe try CStr(Time) instead of Time$ though I don't see why that'd be a problem...
0
 
LVL 9

Expert Comment

by:Dang123
ID: 9628888
Can you post the function the line is in?
0
 

Author Comment

by:Dormouse31
ID: 9628898
Thanks for the help, but I just figured it out. I stupidly had a variable named Time...
0
Independent Software Vendors: 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!

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 9628906
Time is a reserved word, are you using it as a variable name?
0
 

Author Comment

by:Dormouse31
ID: 9629187
Yeah... I was. i fixed it
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9629381
That's OK, just see posting time for each comment. Cheers
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question