Solved

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

Posted on 2003-10-27
6
318 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
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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