Click here to Skip to main content
15,890,438 members
Everything / Programming Languages / VBScript

VBScript

VBScript

Great Reads

by Doug Schmidt
A VBScript utility that continually monitors a VSS database and sends emails when certain patterns are detected. Can be run as an NT service.
by Kewin Rausch
A tool for translating C/C++ makefile projects in Visual Studio compatible ones
by Larry Boeldt
Building on a previous article, we now delve into the Facebook Graph API and provide a few useful functions.
by Duncan Edwards Jones
Part 2 in the series showing how to write a debugger in VB

Latest Articles

by Member 4206974
Form generator is a class module written in Basic4Android (B4A) for build and handle forms data.
by rkapl
Automated Setting of the Out of Office Assistant
by Marijan Nikic
How to set AIP label via VBScript code
by Igor Krupitsky
How to compare two Excel Files using VBS

All Articles

Sort by Updated

VBScript 

7 May 2007 by #realJSOP
The VBScript version of my C# article about the very same thing
25 Aug 2010 by #realJSOP
To make the game more interesting, you should provide somethig to keep them from trying to count the seconds, and THEN ask them to guess how many seconds:- Solve an anagram- Perform a simple math calculation- Arrange playing cards in the correct order- Provide parts for a robot and...
14 Feb 2011 by #realJSOP
First, you have to hire a programmer. At that point, he'll probably be happy to tell you that if you take an XML file, and remove the first five lines of the file, it's no longer a valid XML file. I'll let you future employee explain why during his interview.
17 May 2011 by #realJSOP
0) We don't know because we aren't familiar with your hardware configuiration or abilities as a coder.1) Try it and see.By the way, if it's on a production server, I doubt if they'll let you deploy an unproven application ton it to handle what appears to be a critical task.
17 Aug 2011 by #realJSOP
You have to use javascript to access the DOM.
5 Dec 2011 by #realJSOP
Set permissions on the EXE as admin only, and don't make anyone else admin on the box.
13 Apr 2019 by #realJSOP
If you're doing this in Excel, you don't need to write a script. You can do it with formulas.
11 Nov 2021 by 0x01AA
Maybe you show what you have tried? Not familar with vbs but after a short google I tried ... Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("""C:\Windows\System32\notepad.exe""") Set objShell = Nothing ......
11 Nov 2021 by 0x01AA
Maybe you show what you tried... No idea about vbs, but after google and tried this .... Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("""C:\Windows\System32\notepad.exe""") Set objShell = Nothing ... and...
24 Aug 2011 by @BangIndia
sir how to do that sir..i can able to open the IE using the vb script..and i can able to change the size and other things . but i don't know how to do that process .. please can you help me...
25 Aug 2011 by @BangIndia
sir i created the vbs for sending keys to the notepad..code is:set wshshell = CreateObject("wscript.shell")dim ww = wshshell.AppActivate("notepad")wshshell.sendkeys" "wshshell.sendKeys"%{f} ^{p}"wshshell.sendkeys"^{p}"but the prob is is sending first keys only..how to...
29 Aug 2011 by @BangIndia
arrComputers = Array(" ip of local","Ip of system1","ip of system2")For Each strComputer In arrComputersSet objWMIService = GetObject("winmgmts:\\" & strComputer & _ "\root\cimv2\Applications\MicrosoftIE")Set colIESettings = objWMIService.ExecQuery _ ("Select * from...
17 Oct 2011 by @BangIndia
This is my vb script that removes a firewall rule that allows an application through the Windows firewall.Set objFirewall = CreateObject("HNetCfg.FwMgr")Set objPolicy = objFirewall.LocalPolicy.CurrentProfileSet colApplications = objPolicy.AuthorizedApplicationserrReturn =...
5 Dec 2011 by @BangIndia
haii search in net how to block any exe running in xp(specially firefox.exe )how to do that one?
9 Jan 2013 by @BangIndia
Using this script strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2")Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("Select * From __InstanceCreationEvent Within 5 Where...
6 Mar 2014 by @BangIndia
My script isSet oXMLHTTP = CreateObject("Microsoft.XMLHTTP")'The object that will receive the answer from the WSSet oXMLDoc = CreateObject("Microsoft.XMLDOM")strParam = "string to pass"'Tell the name of the subroutine that will handle the response'Initializes the request (the...
27 May 2015 by _Asif_
Look at these, If you have had google, you could have found these yourself.How to run a vbs file using task scheduler?[^]can .vbs file be a scheduled script?[^]
1 Feb 2016 by _Asif_
Try thisPublic Sub Tray(ByVal hWnd&, ByVal hIcon As StdPicture, ByVal sTip$, Acao As Acoes) Dim i As NOTIFYICONDATA With i .hWnd = hWnd .hIcon = hIcon .szTip = sTip & vbNullChar .uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP .uCallbackMessage = &H200 ...
3 Feb 2010 by _Damian S_
Have you considered taking the contents of your datagrid and exporting it to a more generic format such as .csv (comma separated values)? ie: Basically creating a text file that can be opened in Excel (or any other program capable of opening text files).This will get around a whole host of...
16 Oct 2016 by A1 mamun
you have add 3 Package1. WinPE-HTA.cab2.WinPE-Scripting.cab3.WinPE-Wmi.cabTo add Hta pakege follow the link of MSDNWinPE: Add packages (Optional Components Reference)[^]other two as like MSDN link but change the Package namethanks .....note: package have two version 64...
12 Jan 2004 by aa2max
Monitor your website and create HTML reports.
11 Jul 2004 by aa2max
Easy Guestbook with ASP and MS Access
5 Aug 2004 by aa2max
Simple News System using ASP and MS Access
29 Oct 2004 by aa2max
A simple image gallery with captions using ASP.
29 Jul 2005 by aa2max
Simple web-based time management application using ASP and MS Access.
19 May 2017 by AAB40
Hi, I'm trying to add an XML file in my excel workbook on sheet 2 to create pivot tables. Everytime that I import an XML file, another excel workbook is opening. How can I change this please? So, to make my actions clear: Open Excel on sheet 1. Click 'Open folder' in the start menu of the excel...
13 Feb 2013 by Aarti Meswania
Hello Experts! :)this is my asp pageon button click I want to call vbscript function but not workingI have tried many results from google search but they didn't worked :( alert(1);"end...
4 Apr 2013 by Aarti Meswania
I got solution from a site,It's not possible to call server-side method from page e.g. on-click event in core Aspso, that I have create a page and list there all tasks and then call that page using Javascript XttpPageRequestHope, it will help them who are facing same problem.Happy...
29 May 2013 by Aarti Meswania
you will need to use trick in this case...try this...Dim perc perc=InputBox("Enter the percenatage:") Select Case True Case (perc > 59 and prec 49 and prec
29 May 2013 by Aarti Meswania
Visit links for examples...http://msdn.microsoft.com/en-us/library/ms974570.aspx[^]http://www.regular-expressions.info/vbscriptexample.html[^]Happy Coding!:)
31 Oct 2013 by aatish442000
I have an xml file DataConfiguration.xml with this entry Petrel 2012 (64-bit) C:\Program Files\Schlumberger\Petrel 2012 ...
5 Nov 2013 by aatish442000
I am new to vbscript code.I have given task to read one text file and copy it to another text file at the end before installtion.After that to delete the same after installation.Please help i am new to it.
29 Mar 2024 by Abed Al Rahman Hussien Balhawan
i have a php script that executes a vbscript , the PHP scrip runs in xaamp, the issue is that the PHP script is executing successfully without executing the VBScript, when I trigger the VBScript manually (double click , it works fine) bellow is...
5 Nov 2008 by Abhay Mhatre
A solution to handle session variable problems between classic ASP and ASP.NET web applications.
11 Mar 2012 by Abhilash Gandhewar
Microsoft VBScript runtime (0x800A005E)Invalid use of Null: 'round'
16 Mar 2011 by Abhinav S
Did you do a search on the internet?I did and came across this[^] as the first result returned.
25 Aug 2011 by Abhinav S
Try by enclosing special key codes (for Alt key etc) in braces {}.
9 Mar 2014 by Abhinav S
TryVBScript to find software in the registry and then run the uninstall string[^]Help searching the registry [^]
20 Jul 2015 by Abhinav S
Try these links -Check Service Status, restart if stopped, email results[^]Monitoring windows services with VBScript[^]
12 Nov 2015 by Abhinav S
Try these links -http://www.republicofcode.com/tutorials/webdevelopment/photo_gallery_tables/[^]http://www.tek-tips.com/viewthread.cfm?qid=660370[^]
12 Nov 2015 by Abhinav S
Try these threads -https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ab529613-fc43-4ab1-847f-098c082f3b7e/help-cannot-use-dynamic-connection-string-with-excel[^]http://www.sqlservercentral.com/Forums/Topic950440-147-1.aspx[^]
15 Aug 2009 by Abhishek Sur
MVC applications does so using URL rewriting. Hope that approach is good for you. Abhishek SurMy Latest ArticlesCreate CLR objects in SQL Server 2005C# Uncommon KeywordsRead/Write Excel using OleDBDon't forget to click "Good Answer" if you like to.
9 Oct 2003 by Adam Byrne
A tiny HTML application that will make your life easier
19 Mar 2007 by Adam Nelson
Describes the COM wrapper around the author's C++ implementation of Double Metaphone, and demonstrates use of this COM wrapper within Visual Basic to phonetically search a list of names, as well as names in a database table.
19 Mar 2007 by Adam Nelson
Further describes the COM wrapper around the author's C++ implementation of Double Metaphone, and demonstrates use of this COM wrapper within ASP and VBScript to query a database of names via a web page.
4 Mar 2013 by Adam R Harris
look at CINT[^]. Then use that in your loop definition i.e. for i as integer = 0 to CINT(myDropDown.SelectedValue) .... your code here .... next imy VB is rusty so this probably wont compile but you should be able to get the point.
28 Sep 2007 by AdamNThompson
How to use SOAP with Classic ASP / VBScript.
26 May 2009 by adatapost
Please refere this link http://www.highdots.com/css-tab-designer/[^] A DATAPOST COMPUTER CENTRE (K.V Prajapati)
21 Oct 2014 by adimdinata
activate the timer set timer enable=trueand timer interval 1000
21 Mar 2012 by adprasad
hi i ad prasadi want a code for sorting of dates in arrays with out using sort function can reply me as early as possible thanksdurga prasad
18 Feb 2009 by Adrian Dorache
Component used to convert a numeric value into English/Romanian words in Excel
19 Mar 2024 by Agent_ Ksined
I need to block apps like gpedit.msc, resmon.exe, msconfig.exe using batch or vbs file, I tried these commands in administrator mode, but it isn`t work What I have tried: REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System...
24 Jan 2006 by Aj Horus
An ActiveX control that allows ASP users to display datalink dialogs.
9 Aug 2011 by Ajain A K
I want to execute a small vb script file, for that I wrote the following code in the notepad and saved that notepad file as"sampleScript.vbs" is that correct? please note the code that I have written. folowing error occured please help meError coming : Expected statement...
7 Nov 2011 by Ajain A K
Hi,I am beginer in VB scripting, I tried to use a hello world program in VB but it gives compilation error somebody please help me how to solve this problem.I use following codeI written this code in notepade and saved as Hello.vbs
14 Apr 2012 by ajofscott
Numerous attempts to instance MSCOMM32.MSCOM within my hypertext application have failed. Will I have to wrapper MSCOMM32 in a user ocx marked as scriptable? Is there a way to access via named pipe or a textstream?
16 Apr 2012 by ajofscott
ActiveX cannot create object! With both object tags and clsid method and in script with the CreateObject("MSCOMM32.MSCOMM") method. Before you ask, yes the license manager was defined before the mscomm and the license file for the mscomm control was referenced. I can create and access...
10 May 2013 by AJV King
Hello,I tried 20+ codes for setting text to clipboard, BUT ALL WENT IN VAIN!!Please help me in how to set text to clipboard using VBScript only.Thanks in Advance,Ajay Varma
8 Apr 2012 by Ak.Mahboubi
i need to read S/N of flash memory by Visual Basic . can you help meplease reply me to [DELETED]@irnase.com[edit]Email removed - OriginalGriff[/edit]
17 Aug 2010 by Al-Farooque Shubho
I wish I knew VBScript, but, I don't know it. However, I was able to run the Custom Validation properly using Javascript. Please try to modify the JavaScript code to VBScript, I believe it won't be hard for you :)Here is the Code:(Please note that, I also added a RequiredFieldValidator...
8 Mar 2010 by Alaric Dailey
The easiest will be to connect via the oledb provider and ADO, then run the following commandSELECT cn, mailFROM 'LDAP://Dc=mydomainname, DC=COM' --replace this with your domain infoWHERE objectClass = 'user'AND objectCategory = 'person'This should return you your list of users.
8 Sep 2015 by Albeiro Martínez
Good morning,How do I create a VBS file that pings multiple hosts and show me the status in screen (NOT in a TXT file). Also I want to make this to be continously monitoring the status and if the status change (either because the host is down or up) these will be showed up in the screen. If...
6 Feb 2007 by aleksisa
Print a document from a stored procedure using a SQL OLE and VB DLL
20 May 2005 by Alex Saveliev
An article on using ActiveX control to display JPEG 2000 images in your VisualBasic applications
16 Feb 2007 by alex turner
Exsead Service Manager is an Open Source (BSD Style License) Windows Service which launches anything via the use of scripts, it is just being released as Open Source, here is more about it.
7 Mar 2007 by alex turner
To complement my earlier post on sending emails using JScript and Netcat, here is the same but using VBScript and showing the translation from JScript to VBScript.
13 Apr 2007 by alex turner
It has been said that large scale creation of long strings from small strings is not practical in VBScript - NOT SO
17 Dec 2007 by alex turner
Excel 2007 does not seem to support DBF files, here is a VBScript workaround.
7 May 2008 by alex turner
A VBScript which creates Delete and Insert statements to backup data from SQL Server.
11 Jan 2010 by alex turner
Sometimes we only have VBScript, but it would still be nice to have database like features or persistence and transactions.
19 Jan 2010 by alex turner
VBScript may be old and ugly, but there are some quick and dirty tricks for which it is still really handy.
8 Feb 2010 by alex turner
I think that to do what you want you simply put the vbscript in tags in the area and put a onkeydown listener in the tag.
15 Feb 2010 by alex_dude
I've seen people who make their own custom "Componets" that can be downloaded and used by other people by using it as a Referance and putting it in their ToolBox.One question, how do you make your componets? I've studied a componet someone made called XButton and in the code, it says...
27 Nov 2001 by AlexanderRegueiro
This is a tutorial which shows you how to create a simple program that will speak anything!
10 Dec 2008 by alfi uziel
Different ways to populate a listbox in Access.
21 Apr 2010 by Aliet_from_russia
How can I do:1. Adding multiple address books by one script? Or it needs one script for one address book?2. After adding address book outlook asks for a password. How do I specify the password in the script?
21 Apr 2010 by Aliet_from_russia
Sorry, here's a link to the article:Adding an LDAP address book to MS Outlook[^]Since the author could not be reached.
25 Jul 2013 by allenflame
I've got one database that all my student information is in and then I've got another database that I'd like to update information based off the first database. I've got the connections working and can pull data but I'm having issues comparing the data. I'm not sure if it's the nested while...
22 May 2013 by Am Gayathri
My application is developed in vb.net.How can i display a message if my dataset retries no record?please helpi tried if (dataset.table.count >0){}else{ message}end ifbut it doesn't showing message if table has no records.so please share your valuable thoughts
20 Feb 2012 by amabi
Is it possible that the script will do the job to automatically copy the dll to "system32"? I mean, the script will run from an autorun and that script will copy that dll to system32 automatically. Is it possible through vbscript? or other scripts will do.another thing, can that script do...
12 Aug 2009 by Aman Bhullar
Try URLRewriting RegardsAman Bhullarwww.arlivesupport.com[^]
22 Nov 2009 by Aman Bhullar
Found a little different script for copying.Check if this can help youhttp://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/
14 Feb 2011 by Amar Venkat Jammula
Hi All,I don't have any idea of how to program. I want a vb program, can anyone help me with this.My requirement is that I have multiple text files in a folder and sub folders too.In each text file I want to remove the first 5 lines and then rename those text files with the original name...
13 Feb 2009 by amattice
Date Format function for VBScript / Classic ASP
1 Mar 2011 by Amit Kumar Tiwari
If I understand correctly, you need to register ActiveX DLLs from your server to client location.If it is so, you first need to download the DLLs on client machine in Temp folder (Windows Temp folder) as the vbscript runs on client side. Once you have downloaded the ActiveX files in the Temp...
29 Jun 2011 by Amit-Dh
We are maintaining a classic asp web site, when a users logs into the site a vbs scripts gets a XML file from the server through XMLHttp object and then parses the XML and does the some further processing. My problem is that the Response XML gets appended with some sort of junk characters F vVO...
31 May 2011 by amit28august
you can use to do thatwindow.showModalDialog(call_notice.html); by this u can do that
26 Sep 2007 by Amol M Vaidya
Using this macro, you can check the output of a code snippet without creating a new project/form. You can do this right from your current code window.
9 Sep 2013 by Anbuclan
Dear programmers i have plan to develop phone call based web site using ASP.NET that is enabling vip protocol on it..Any one guide me to achive my thought.....
29 Mar 2024 by Andre Oosthuizen
As stated above, you cannot run a client side app (vbscript) with a server side app (php). An alternative approach is to use a server-side scripting language like Python or Node.js, which have libraries and modules specifically designed for...
4 Aug 2008 by Andrei Smolin
Outlook Today is a sample of a custom Outlook home folder page. In this article, you will learn how to create such a page in VBScript and in .NET (VB, C#, C++).
28 Jan 2011 by Andremaha
Hay , How to write a logic bomb using VBScript ??Only for education purposes .Thanks !! :doh: :doh: :doh:
11 Dec 2007 by Andrew Friedl
Using the KudzuASp Template Engine for Classic ASP
19 Sep 2011 by André Kraak
I found this piece of code[^] that might do the job.
19 Sep 2011 by André Kraak
The way your code is now only the last folder is used, with each Set objFolder statement you are overwriting the previous value. So in effect only the files in the folder from the statement Set objFolder = objFSO.GetFolder("C:\Documents and Settings\" & objnet.UserName & "\Belgelerim\mailbox")...
26 Sep 2012 by André Kraak
The way I check the bit version of the OS is by checking for the presence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node[^].If this key is not present you are on a 32-bit OS and 64-bit when it is present.
31 Mar 2015 by Anele 'Mashy' Mbanga
Create CRUD web apps in three easy steps using JQM.Show
15 May 2015 by Anele 'Mashy' Mbanga
Create JQuery Mobile Apps with JQM.Show on your PC with these tools.
3 Jan 2012 by Anhsa
Hi,I have an html table with 10 columns as fields(TC1,TC2.....TC10) and 10 rows (R1, R2,........R10). This able contains only pass and fail data as per the combination of TC1 vs R1, TC1 vs R2 and so on.When a user clicks on any of the cell with value as Fail.I need to retrieve the...
24 Nov 2011 by Anish K S
I have some javascript Code I need to convert this to VB Script. Can anyone help me?if (parseInt("") > 0) payer = ""; else if (parseInt("") == 0) payer = 0;ThanksAnish K S