Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run time error 13 type mismatch
You could check for a number first before doing anything...
Code ------------------- Private Sub Worksheet_Calculate() Dim Inrange As Range Dim rng As Range Set Inrange = Range("B16,B58,T4,T15,T23,T50") For Each rng In Inrange.Cells If Not IsNumeric(rng.Value) Then If rng.Value = "c" Then rng.Font.Name = "Wingdings 3" Else rng.Font.Name = "Webdings" End If End If Next rng End Su ------------------- Throw an Else in there if you want to do something if the value is number. -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
run-time error 13: Type mismatch? | Excel Discussion (Misc queries) | |||
Visual Basic macro run time error(13) type mismatch | Excel Discussion (Misc queries) | |||
Run Time Error '13' Type mismatch | Excel Programming |