Solved

Vbscript custom message box button titles

Posted on 2010-08-31
3
1,028 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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