Solved

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

Posted on 2003-10-27
6
282 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
Comment Utility
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
Comment Utility
Can you post the function the line is in?
0
 

Author Comment

by:Dormouse31
Comment Utility
Thanks for the help, but I just figured it out. I stupidly had a variable named Time...
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 16

Accepted Solution

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

Author Comment

by:Dormouse31
Comment Utility
Yeah... I was. i fixed it
0
 
LVL 16

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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 trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now