Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default run time error 13

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default run time error 13

Mike,

What line in the code produces the error?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mike allen" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default run time error 13

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?

"Chip Pearson" wrote in message
...
Mike,

What line in the code produces the error?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mike allen" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 08:35 PM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 07:45 PM


All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"