Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CellValueOfZero
I have a macro that is activated by button. I have a cell b4 that an operator
must enter a numerical value greater than zero. I need a sub that would check the value of cell b4. If the value is greater than zero, then the sub would proceed. If cell b4 is equal to 0, then a message box would appear telling the operator that a 0 value has been entered. Once the operator clicks the OK in the message box, an exit sub would be activated and the operator would be returned to the data entry screen. thanks for any assistance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CellValueOfZero
Hi Mike,
Try this for beggining: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("B4") < 0 Then Call Test ElseIf Range("B4") = 0 Then MsgBox "a 0 value has been entered!" Else End If End Sub Sub Test() MsgBox "Bla Bla Bla" End Sub Regards. Jorge "Mike" escreveu na mensagem ... I have a macro that is activated by button. I have a cell b4 that an operator must enter a numerical value greater than zero. I need a sub that would check the value of cell b4. If the value is greater than zero, then the sub would proceed. If cell b4 is equal to 0, then a message box would appear telling the operator that a 0 value has been entered. Once the operator clicks the OK in the message box, an exit sub would be activated and the operator would be returned to the data entry screen. thanks for any assistance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
CellValueOfZero
A little bit mo
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If IsEmpty(Range("B4")) Then Exit Sub End If If Range("B4") < 0 Then Call Test ElseIf Range("B4") = 0 Then MsgBox "a 0 value has been entered!" Else Exit Sub End If End Sub Sub Test() MsgBox "Bla Bla Bla" End Sub Regards. Jorge "Jorge Rodrigues" escreveu na mensagem ... Hi Mike, Try this for beggining: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("B4") < 0 Then Call Test ElseIf Range("B4") = 0 Then MsgBox "a 0 value has been entered!" Else End If End Sub Sub Test() MsgBox "Bla Bla Bla" End Sub Regards. Jorge "Mike" escreveu na mensagem ... I have a macro that is activated by button. I have a cell b4 that an operator must enter a numerical value greater than zero. I need a sub that would check the value of cell b4. If the value is greater than zero, then the sub would proceed. If cell b4 is equal to 0, then a message box would appear telling the operator that a 0 value has been entered. Once the operator clicks the OK in the message box, an exit sub would be activated and the operator would be returned to the data entry screen. thanks for any assistance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
CellValueOfZero
And a little bit mo
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If IsEmpty(Range("B4")) Then Exit Sub End If If Range("B4") < 0 Then Call Test ElseIf Range("B4") = 0 Then MsgBox "a 0 value has been entered!" Else Exit Sub End If Range("B4").ClearContents End Sub Sub Test() MsgBox "Bla Bla Bla" End Sub Regards. Jorge "Jorge Rodrigues" escreveu na mensagem ... Hi Mike, Try this for beggining: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("B4") < 0 Then Call Test ElseIf Range("B4") = 0 Then MsgBox "a 0 value has been entered!" Else End If End Sub Sub Test() MsgBox "Bla Bla Bla" End Sub Regards. Jorge "Mike" escreveu na mensagem ... I have a macro that is activated by button. I have a cell b4 that an operator must enter a numerical value greater than zero. I need a sub that would check the value of cell b4. If the value is greater than zero, then the sub would proceed. If cell b4 is equal to 0, then a message box would appear telling the operator that a 0 value has been entered. Once the operator clicks the OK in the message box, an exit sub would be activated and the operator would be returned to the data entry screen. thanks for any assistance. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
CellValueOfZero
Jorge
Thanks for the help. Appreciate it. Mike "Mike" wrote: I have a macro that is activated by button. I have a cell b4 that an operator must enter a numerical value greater than zero. I need a sub that would check the value of cell b4. If the value is greater than zero, then the sub would proceed. If cell b4 is equal to 0, then a message box would appear telling the operator that a 0 value has been entered. Once the operator clicks the OK in the message box, an exit sub would be activated and the operator would be returned to the data entry screen. thanks for any assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|