Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default If statement to stop macro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Formula Formatting - How to Add a STOP Statement rhg Excel Worksheet Functions 4 August 15th 09 06:35 PM
If statement - can it stop once a conditon is reached? mike Excel Worksheet Functions 1 July 10th 09 07:56 PM
Stop running a macro in the middle of a macro gmunro Excel Programming 3 June 9th 05 06:00 PM
Macro: With Stop it works. Without Stop it doesn't. Don Wiss Excel Programming 2 October 12th 04 10:49 AM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"