Solved

Vbscript custom message box button titles

Posted on 2010-08-31
3
1,024 Views
Last Modified: 2012-05-10
hi all,

im wondering if i can have custom msgbox button titles?

eg.

"welcome user please press set me up to begin setup or if you are already set up please press cancel now"
[Set Me Up] [Cancel]

also how do i put "(speech marks) in text?

Thanks
0
Comment
Question by:awilderbeast
3 Comments
 
LVL 8

Accepted Solution

by:
Mikkk earned 500 total points
ID: 33565502
0
 
LVL 1

Author Closing Comment

by:awilderbeast
ID: 33565537
thanks
0
 
LVL 5

Expert Comment

by:MaxSoullard
ID: 33565541
you can try this HTA code. Just add your set up script on the SetMeUp Sub
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Set Me Up</title>
<HTA:APPLICATION 

     ID="objSysUtility" 
     APPLICATIONNAME="Set Me Up"
     SCROLL="no"
     SINGLEINSTANCE="yes"
     navigable="yes"
	 hta:application icon="netshell.dll" sysmenu="yes" minimizebutton="yes" maximizebutton="no">   

  
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	background-image: url(binary.jpg);
	background-repeat: no-repeat;
}

-->
</style>
</head>


<SCRIPT Language="VBScript">

'Resize the internet explorer window and center it in the middle of the screen
Sub Window_onLoad
	Window.ResizeTo 400, 200
    Window.moveTo (screen.width-450)/2, (screen.height-380)/2

End Sub

Sub SetMeUp
msgbox("Set Me Up button activated")
'*****************************************************************
'						SCRIPT GOES HERE
'						SCRIPT GOES HERE
'						SCRIPT GOES HERE
'						SCRIPT GOES HERE
'						SCRIPT GOES HERE
'						SCRIPT GOES HERE
'*****************************************************************

End Sub


Sub Cancel
	Window.close()
End Sub

</SCRIPT>


<body bgcolor="#D4D0C8">

<table width="374" border="0" align="left" cellpadding="0" bordercolor="#333333" class="style2" id="signature" cellspacing="0">
  <tr>
    <td width="374" colspan="3">
	<p align="center">&nbsp;</form><span class="style3">&nbsp;</span><span class="value"><span class="pBody postableBody"><br>
	<font face="Arial">&quot;welcome user please press set me up to begin setup or if 
	you are already set up please press cancel now&quot;</font></span></span></p>
	<p align="center">&nbsp;</td>
  </tr>
  <tr>
    <td width="185">
		<input id="CreateSub" type="button" value="Set Me Up" name="B2" onclick="SetMeUP" style="float: right"></td>
	    <td width="15">&nbsp;</td>
	    <td width="174">
		<input id="CreateSub" type="button" value="   Cancel   " name="B1" onclick="Cancel" style="float: left"></td>
  </tr>
  <tr>
    <td width="185">
	&nbsp;</td>
	    <td width="15">&nbsp;</td>
	    <td width="174">&nbsp;</td>
  </tr>
  <tr>
    <td width="185">
		</td>
	    <td width="15">&nbsp;</td>
	    <td width="174">
		</td>
  </tr>
  <tr>
    <td width="185">
	&nbsp;</td>
	    <td width="15">
		<p align="center">
		</td>
	    <td width="174">
		&nbsp;</td>
  </tr>
  <tr>
    <td width="185">
	&nbsp;</td>
	    <td width="15">
		&nbsp;</td>
	    <td width="174">
		&nbsp;</td>
  </tr>
  </table>
<p>
	&nbsp;</p>


</form>
<p align="center">&nbsp;</p>


</form>

</body>

</html>

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now