View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
pjhageman[_9_] pjhageman[_9_] is offline
external usenet poster
 
Posts: 1
Default Compile error: type mismatch

Thanks, Rob, this cleared the problem.

Rob van Gelder wrote:
*Looks as though CheckRange wants a range, not a string.
Try:
sMsg = sMsg & CheckRange(Range("G26"))

Rob

"pjhageman " wrote in
message
...
Excel 2000
I am getting a Compile error: Type Mismatch, "G26" is highlighted.

How
do I clear this problem?

Public Function ValidScorecard() As Boolean
Dim sMsg As String
ValidScorecard = True
sMsg = sMsg & CheckRange("G26") <---------
sMsg = sMsg & CheckRange("AG26")
sMsg = sMsg & CheckRange("G44")
sMsg = sMsg & CheckRange("AG44")
If Len(sMsg) 0 Then
MsgBox sMsg
ValidScorecard = False
End If
End Function


---
Message posted from http://www.ExcelForum.com/
*



---
Message posted from http://www.ExcelForum.com/