Compile error: type mismatch

P

pjhageman

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
 
R

Rob van Gelder

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

Rob
 

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