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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Missmatch Error

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
AU
Hi,

I have a small but confusing error that I never get anywhere else when retrieving color settings saved in an INI file. Below is the INI File and associated problem, as well is the procedure below it that calls the settings of the INI File.

INI File Demo1.INI
~~~~~~~~~~~~~~~~~~
[3DSETTINGS]
'
'
'
LBL13DDepth=10
LBL13DColor=255

'
'
' etc...
-----------------------------------------------------
Getting From INI File
~~~~~~~~~~~~~~~~~~~~~

Private Sub GetColorFromINI()
'
'
'
For i = 1 To DepthLBL1 - 1
Load .lbl1(i)
.lbl1(i).ForeColor = GetINI("3DSETTINGS","LBL13DColor")
'
'
' etc....
Next i
'
End Sub
-----------------------------------------------------
Type missmatch on color!

I have called the color before, actually, it saves the last
session to the applications' INI File and is recalled when opened again.

So what's the difference from that to this?
I've matched everything perfectly but apparently it's still giving me this stupid type missmatch error.

Any Idea why and is there a better way to call and/or save the color?

Thanks again,

Andrew.
 
I worked it out finally.

I should have put the Val(LBL13DColor) in the code.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top