Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Simple Msgbox needed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
johncassell - 22 Feb 2006 11:02 GMT
Hello, I am looking for a simple msgbox which will pop up if there i
nothing in a certain cell and ask the user if he wants to continue th
macro. If he clicks Yes then code continues otherwise it stops.

After looking in the VB help it only shows the following code but i
seems far too messy for what I need. Can anyone help with a simple
version please.

-----------
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to continue ?"    ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2    ' Define buttons.
Title = "MsgBox Demonstration"    ' Define title.
Help = "DEMO.HLP"    ' Define Help file.
Ctxt = 1000    ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then    ' User chose Yes.
MyString = "Yes"    ' Perform some action.
Else    ' User chose No.
MyString = "No"    ' Perform some action.
End If
-------------
Norman Jones - 22 Feb 2006 11:49 GMT
Hi John,

'=============>>
Public Sub TesterD001()
   Dim res As Long

   res = MsgBox("Do you wish to continue", vbYesNo)

   If res = vbYes Then
       ' Your processing code
   End If

End Sub
'<<=============

---
Regards,
Norman

> Hello, I am looking for a simple msgbox which will pop up if there is
> nothing in a certain cell and ask the user if he wants to continue the
[quoted text clipped - 20 lines]
> End If
> --------------
johncassell - 24 Feb 2006 17:57 GMT
Cheers for that Norman, looks much neater.

Thanks again

John

Signature

johncassell

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.