run time error 13

M

mike allen

i created code in excel 2000 and it runs fine. i sent it to someone else
who has, i think, excel 97, possibly earlier, and it doesn't work. he gets
'run time error 13'. the code is short and simple and the only parts that
could possibly not transfer into '97 are match or chr(10).

Sub playersstats()
myMessage = ""
For i = 17 To 31
currentplayer = Sheets("input").Cells(i, 4)
rowonsheet = Application.Match(currentplayer,
Sheets("quotas").Range("a1:a5000"), 0)
myMessage = myMessage & currentplayer & " : new quota: " &
Sheets_("quotas").Cells(rowonsheet, 4) & Chr(10) & Chr(10)
Next i
MsgBox myMessage
End Sub
this seems to happen fairly often, where i can run code fine on my excel,
but others (presumably w/ older excels) have problems. any ideas? thanks,
mike allen
 
M

mike allen

under a scaled down version of code, after 'run time error 13' is 'type
mismatch'. i assume this is referring to 'application.match'. can you use
this function in excel 97?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top