Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi, can please send me the proper syntax for message box...my code doesn' seem to work. thans -- tweety12 ----------------------------------------------------------------------- tweety127's Profile: http://www.excelforum.com/member.php...fo&userid=3467 View this thread: http://www.excelforum.com/showthread.php?threadid=54597 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What doesn't work?
Go the VBA help Type in: msgbox function Pick the first All will be explained. RBS "tweety127" wrote in message ... hi, can please send me the proper syntax for message box...my code doesn't seem to work. thansk -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See help in VBA, it's all explained there.
-- HTH Bob Phillips (replace somewhere in email address with googlemail if mailing direct) "tweety127" wrote in message ... hi, can please send me the proper syntax for message box...my code doesn't seem to work. thansk -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() MsgBox Prompt, Command Buttons (Optional), Title Bar (Optional) MsgBox "You can't get there from here.",vbOKOnly,"Box Title Bar" You can get a return value for a variable by declaring the variable and using the MsgBox function: dim intYesNo as Integer intYesNo = MsgBox("Want to Continue?,vbYesNo,"Dialog Box Title") If you don't provide a command button or title bar the OK command button is used as the default along with the default title bar for the message box -- Kevin Backmann "tweety127" wrote: hi, can please send me the proper syntax for message box...my code doesn't seem to work. thansk -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() here's the code and this is not working. error message: Expected: = If Worksheets("sheet5").Range("c6") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c7") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c8") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c9") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As you are not using the result of the Msgbox function
you have to take the brackets out, so: MsgBox "Fill in the Missing Information!", vbOK, "warning" etc. Didn't your code show up in red? RBS "tweety127" wrote in message ... here's the code and this is not working. error message: Expected: = If Worksheets("sheet5").Range("c6") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c7") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c8") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If If Worksheets("sheet5").Range("c9") = " " Then MsgBox("Fill in the Missing Information!", vbOK, "Warning") End If -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I think you should delete the parentheses in the MsgBox function as follows: If Worksheets("sheet5").Range("c6") = " " Then MsgBox "Fill in the Missing Information!", vbOK, "Warning" Worksheets("sheet5").Range("c6").Select 'Added Exit Sub 'Added End If The "Exit Sub" is added to enable the user to complete the information. I hope this helps. Regards, |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try putting this in the Worksheet Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim msg, style, title, response If Sheet5.Range("c5").Value = "" Or _ Sheet5.Range("c7").Value = "" Or _ Sheet5.Range("c8").Value = "" Or _ Sheet5.Range("c9").Value = "" Then msg = "Please complete the missing information" title = "Required Information Missing" style = vbOKOnly + vbExclamation + vbDefaultButton1 + vbApplicationModal response = MsgBox(msg, style, title) End If End Sub End Sub -- ljsmith ------------------------------------------------------------------------ ljsmith's Profile: http://www.excelforum.com/member.php...o&userid=30531 View this thread: http://www.excelforum.com/showthread...hreadid=545970 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You're Such Of Great Help! Thank -- tweety12 ----------------------------------------------------------------------- tweety127's Profile: http://www.excelforum.com/member.php...fo&userid=3467 View this thread: http://www.excelforum.com/showthread.php?threadid=54597 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace Excel Message w/Custom Message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Opening an attachment of a message that has a message as attachmen | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |