Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Macro Type Mismatch Error :( 1

Status
Not open for further replies.

colbyhynes

Programmer
May 25, 2011
3
CA
Hi All!

I understand the meaning of a type mismatch error ( runtime error 13 ) however I'm not sure what the problem is here...

I've got one line of code that runs with no problems:


ElseIf (Check = "Com") Or (Check = "COM") Or (Check = "HRP") Or (Check = "HIG") Or (Check = "PWR") Or (Check = "COM") Or (Check = "POW") And (Range("H" & Count) = "REL") Then...


But then this line of code will not run:


ElseIf (Check = "Mis") Or (Check = "MIS") And (Range("H" & Count) = "REL") And (Range("I" & Count) <> "MISSI & NOTIGI SECURITY UPGRADE") And (Range("I" & Count) <> "Missing") Then...


Any ideas or input? Greatly Appreciated! Thank you!
 


hi,

Your 2 statements run without error. assuming that Count is within the sheet row count for your version of Excel.

The VB Editor run time compiler often gives error messages that are unrelated to the actual problem.

Therefore, thoroughly check you code. Make sure that every object reference is fully qualified. Make sure that each block statement is terminated correctly.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top