excel - Get the value of a cell and do something based on the number in that cell -
i have been trying create code in exel looks @ value of cell , performs hide
action if number in cell less 99.
here idea:
private sub worksheet_change(byval target range) application.screenupdating = false dim cellvalue integer cellvalue = target.value("$d$68") if cellvalue <= 99 rows("70:77").hidden = true else rows("70:77").hidden = false application.screenupdating = true end if end sub
i believe problem here cannot obtain reference cell? how this?
i suppose should replace cellvalue = target.value("$d$68")
cellvalue = target.value
- target range has homecoming value, have wrong syntax.
manually value d68
may returned cellvalue = range("d68").value
.
excel vba
No comments:
Post a Comment