Just wanted to put this out there for those who might encounter the same mistake and perhaps get some insight from others as to why it causes a "Type Mismatch" Error:
I had code similar to the following (took a lot of code out):
while not RCMfile.AtEndOfStream
strText = RCMfile.ReadLine
Dim strReq(5), strRandReqNum
strAlpha = array("A","B","C","D","E","F"
for I = 0 to 4
randomize
mynum = Int((35 - 1 + 1) * Rnd + 1)
if mynum > 9 then
strReq(I) = strAlpha(mynum)
else
strReq(I) = mynum
end if
next
wend
Fix: Moved the declaration of the Loop and it was fine.
Question for the gurus: Why did this cause this error? Would have thought it would cause a Redeclaration error. ****************
DariceLR
:-{} :-V
****************
I had code similar to the following (took a lot of code out):
while not RCMfile.AtEndOfStream
strText = RCMfile.ReadLine
Dim strReq(5), strRandReqNum
strAlpha = array("A","B","C","D","E","F"
for I = 0 to 4
randomize
mynum = Int((35 - 1 + 1) * Rnd + 1)
if mynum > 9 then
strReq(I) = strAlpha(mynum)
else
strReq(I) = mynum
end if
next
wend
Fix: Moved the declaration of the Loop and it was fine.
Question for the gurus: Why did this cause this error? Would have thought it would cause a Redeclaration error. ****************
DariceLR
:-{} :-V
****************