invalid procedure call

G

geebee

hi,

i have the following:

selection.formatconditions.add type:=xlformula, operator:=xllesequal, _
formula1:=round(" & xlcol2 & "17,3)<=$G$17"

and this is causing a runtime error 5: invalid procedure call or argument.

how can i fix this?

thanks in advance,
geebee
 
C

Chip Pearson

Try

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, _
Formula1:="=round(" & xlcol2 & "17,3)<=$G$17"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

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