Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to make a small error catch in a macro that will halt it if a
formula produces an error of #VALUE! I was thinking something like this: If Range("C25").Value = "#VALUE!" Then MsgBox "Please Login before executing this macro" Exit Sub End If Obviously my syntax is off. Can someone help me with this? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you could use something like this
If IsError(Range("a1")) Then MsgBox "Please Login before executing this macro" Exit Sub End If -- Gary "slim" wrote in message news:5P%gf.12128$Lw6.3130@trndny02... I'd like to make a small error catch in a macro that will halt it if a formula produces an error of #VALUE! I was thinking something like this: If Range("C25").Value = "#VALUE!" Then MsgBox "Please Login before executing this macro" Exit Sub End If Obviously my syntax is off. Can someone help me with this? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If IsError(Range("C25").Value) Then
MsgBox "Please Login before executing this macro" Exit Sub End If -- HTH RP (remove nothere from the email address if mailing direct) "slim" wrote in message news:5P%gf.12128$Lw6.3130@trndny02... I'd like to make a small error catch in a macro that will halt it if a formula produces an error of #VALUE! I was thinking something like this: If Range("C25").Value = "#VALUE!" Then MsgBox "Please Login before executing this macro" Exit Sub End If Obviously my syntax is off. Can someone help me with this? Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent...works great...Thanks!
"Bob Phillips" wrote in message ... If IsError(Range("C25").Value) Then MsgBox "Please Login before executing this macro" Exit Sub End If -- HTH RP (remove nothere from the email address if mailing direct) "slim" wrote in message news:5P%gf.12128$Lw6.3130@trndny02... I'd like to make a small error catch in a macro that will halt it if a formula produces an error of #VALUE! I was thinking something like this: If Range("C25").Value = "#VALUE!" Then MsgBox "Please Login before executing this macro" Exit Sub End If Obviously my syntax is off. Can someone help me with this? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Result is "V6", need Excel to use cell "V6", not the resul | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
=randbetween still produces "#name?" after running the add-In | Excel Worksheet Functions | |||
Adding more than 3 cells (2003)produces "0" but no error message | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |