Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vbscript type mismatch error

Status
Not open for further replies.

BroSki23454

Technical User
Jan 20, 2014
3
Hello im getting an error that I cant seem to find the solution for and was hoping someone here could help me out.
The error message is a type mismatch and has to do with the Wscript.Echo line, thanks for your help
.
Code:
For i = 0 To UBound(tblEmployee) 
	WScript.Echo vbNewLine & "Employee ID:", tblEmployee(i)(ID) & vbNewLine & _
	        "Last name:", tblEmployee(i)(FNAME) & vbNewLine & _
			"First name:", tblEmployee(i)(LNAME) & vbNewLine & _
			"Hours:", tblEmployee(i)(HOURS) & vbNewLine & _
			"Rate:", tblEmployee(i)(RATE) & vbNewLine & _
			"Email:", tblEmployee(i)(EMAIL) & vbNewLine & _
			"Pay:", tblEmployee(i)(PAY) & vbNewLine 
Next
 
What is tblEmployee ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It would have to be a 'Dictionary Object' not an Array to address it as a associative array in vBscript.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Thanks for the input, I found the issue was that I had the array as Dim tblEmployee(100) when it needed to only store 3 values, so it errored after looping through the 3 values
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top