Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Running a macro to basically rearrange data. However if there is no data, i
receive and error. Can I use an If statement to check a cell and if blank or "0" to stop macro? Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes you can.
If Range("A1").Value = 0 Then Exit Sub HTH. Best wishes Harald "AK" skrev i melding ... Running a macro to basically rearrange data. However if there is no data, i receive and error. Can I use an If statement to check a cell and if blank or "0" to stop macro? Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do you get a Msg box to show up with "Comments"?
Thanks "Harald Staff" wrote: Yes you can. If Range("A1").Value = 0 Then Exit Sub HTH. Best wishes Harald "AK" skrev i melding ... Running a macro to basically rearrange data. However if there is no data, i receive and error. Can I use an If statement to check a cell and if blank or "0" to stop macro? Thanks in advance |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi AK,
Try: Sub MyMessageComments() MsgBox "Comments: This question has no obvious nexus " & _ "with the subject used in your post" & vbNewLine & _ "In cases like this, it is most beneficial to you, and" _ & "courteous to others, to initiate a new thread." & _ vbNewLine & "Perhaps a suitable title for your new " & _ "thread might be ""How can I run a MsgBox""", _ Title:="A Friendly Tip" End Sub --- Regards, Norman "AK" wrote in message ... How do you get a Msg box to show up with "Comments"? Thanks "Harald Staff" wrote: Yes you can. If Range("A1").Value = 0 Then Exit Sub HTH. Best wishes Harald "AK" skrev i melding ... Running a macro to basically rearrange data. However if there is no data, i receive and error. Can I use an If statement to check a cell and if blank or "0" to stop macro? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Formula Formatting - How to Add a STOP Statement | Excel Worksheet Functions | |||
If statement - can it stop once a conditon is reached? | Excel Worksheet Functions | |||
Stop running a macro in the middle of a macro | Excel Programming | |||
Macro: With Stop it works. Without Stop it doesn't. | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |