?
Solved

Vbscript custom message box button titles

Posted on 2010-08-31
3
Medium Priority
?
1,056 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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

864 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