I am a VBA beginner and need some help.


This is an input form using Template Wizard to store the data in the database sheet.
Half of the users of this form have Excel 2010 and half have 2003.
Because of that environment, "WordArt" and "text box" are not showing the same (not compatible between those versions).
What I like to do is change the font/size when a certain word is selected for the header.
Since Conditional Format won't change the font, I had to create a macro.
Private Sub Worksheet_Calculate()
If Range("K19").Value = "WANTED" Then
Range("A8:H8").Select
With Selection.Font
.Name = "Arial Black"
.Size = 85
.Bold = True
End With
Else
Range("A8:H8").Select <-- error: highlight here & opens the database sheet
With Selection.Font
.Name = "Impact"
.Size = 80
.Bold = False
End With
End If
End Sub
This macro works fine to change the font but when I try to save the file, I get a message:
"Run time error 1004 - Unable to set the name property of the font class" and the line after "Else"
will be highlighted and the database sheet will be opened.


I don't know what the problem is.
Please someone help me with this.
Bookmarks