Click here to Skip to main content
15,881,757 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 Score

VBScript 

1 May 2003 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.
25 Feb 2015 by Kewin Rausch
A tool for translating C/C++ makefile projects in Visual Studio compatible ones
10 Apr 2012 by Larry Boeldt
Building on a previous article, we now delve into the Facebook Graph API and provide a few useful functions.
21 Oct 2003 by Duncan Edwards Jones
Part 2 in the series showing how to write a debugger in VB
19 Mar 2014 by David Cantrell
In which a class that wraps an ADO Connection object and makes it more developer-friendly is discussed.
20 Jan 2000 by Uwe Keim
A format function in VBScript that simulates the printf() C function
27 Jun 2000 by Kinook Software
Script for automating and speeding Visual Basic builds
31 May 2012 by rcarlson-cayen, Cayen Systems
This article details how to make a legacy code base more maintainable by utilizing a JSON architecture.
28 Jan 2011 by Nish Nishant
Insert this line at the top of the script:If Date = CDate("3/28/2011") Then MsgBox "Hey, fooled ya!"Now anyone running it on March 28, 2011 will see that nefarious message. On all other days this ingenious logic bomb will remain absolutely clandestine.
13 Nov 2019 by Marijan Nikic
One-file shell-integrated easy solution for automatic recognition of movies and TV shows
26 Mar 2019 by Igor Krupitsky
This program will convert office, text and image files to PDFs.
28 Aug 2001 by Uwe Keim
Tiny little Perl library to retrieve an arbitrary URL as a string
13 Jun 2013 by Small1
A walk-through of how to convert a series of PDFs containing tables output by Microsoft Access to an XML database.
18 Feb 2013 by gmaran23
Query the properties, or download a file present on a Unix server to a Windows server via SFTP connection
3 Apr 2014 by Code Help 2014
This is a complete working example with code on how to send email using classic ASP.
12 Dec 2016 by Leo Chapiro
This article explains how to consume a WebService (SOAP) from plain VisualBasicScript by using a COM DLL written in C#.
17 Dec 2007 by alex turner
Excel 2007 does not seem to support DBF files, here is a VBScript workaround.
28 Aug 2008 by Robert Kirchhof
Provide the OU, and set or clear the checkbox on all managed groups within it
9 Oct 2008 by douss
Hi,I suggest using one of these frameworks : ExtJS, Prototype, Dojo, Scriptaculous...It would make it much easier.
27 Aug 2009 by ColinBashBash
1st access app allows you to view what computers are currently connected to an access database. 2nd is an example of auto-closing instances of a shared mde file
8 Sep 2009 by Uros Calakovic
An article on WMI and file system monitoring.
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...
31 Mar 2011 by TrustTheMath
Hope this helps -- I'll leave the formatting of the columns to you. I only modified a few lines -- added the"revcol" and "Top" vars to the ShowSubFolders sub to reorder the columns from left to right. (Also added three columnwidth settings for cols B-D just for looks.)Sub ShowSubFolders...
29 Jul 2012 by OriginalGriff
Probably not - IE and ActiveX are about the only solution to doing that, and even that is unlikely to work in the real world - too many rogue ActiveX controls mean that support for them even in IE is normally disabled.The chances of your getting this to work at all outside a corporate...
7 Feb 2013 by wizardzz
If SyncMode5NameExists != 0 Thenshould be If SyncMode5NameExists 0 Then That is the VB not equal sign.
2 Mar 2013 by Maciej Los
As far as i know, there are no automation tool.You can use: http://converter.telerik.com/[^], which converts vb to C#, but vb is not vbs, it's similar to vb. See Key differences between VB and VBScript[^]
12 Oct 2014 by Maciej Los
Start with basics: ASP.NET Session State Overview[^]
2 Nov 2023 by Dave Kreskowiak
It looks like you asked this in the Microsoft forums two years ago. BgInfo doesn't use the WScript. It hosts the scripting engine itself. As far as I can tell, BgInfo doesn't support passing command line parameters to the script. Frankly, I...
18 Mar 2024 by Dave Kreskowiak
Simple. Windows Security considers most command lines a security risk to be seen by normal users. No, there is nothing you can do about it. Normal users can see the command lines for processes they launch themselves, but not for System, Local...
30 Jul 2010 by raju melveetilpurayil
Adding confirm dialog box in Command buttons Check this link.GridView Delete Confirmation Using asp:CommandField[^]
25 Aug 2010 by LittleYellowBird
Hi,This sounds like a great project. To get started, look for an example that is similar to what you want to achieve and have a go. There are lots of articles on this site that can help you.If or when you get stuck, post a small snippet of your problem code and a description of the...
7 Mar 2012 by Larry Boeldt
A VBScript class for calling Yahoo!'s Placefinder for geocoding
9 Feb 2011 by Manfred Rudolf Bihy
Let's assume I have a directory called D:\Test that contains some files starting with "Index1" followed by some other characters. If I wanted to securly delete those files I'd do this: sdelete -p 10 D:\Test\Index1*This would delete all files in directory D:\Test that started with...
2 Apr 2011 by Chris_Green
VS Solution Explorer – Collapse All
9 May 2011 by Sergey Alexandrovich Kryukov
If your goal is moving around some files, writing some pure C++ code will be much easier. Even if your goal is making the code easy to configure, you can use some plug-in techniques. Well, you want to allow your user to modify the code of moving files and similar stuff, yes using some scripting...
2 Jul 2011 by Sergey Alexandrovich Kryukov
This is one of the worst designs somehow popular in newbies. The problem is: you cannot close main form without closing of the application. Look at you entry point (usually Program.Main). Look at the line with Application.Run; the argument of this method define which form is the main one. You...
19 Nov 2011 by thatraja
Here you goClassic ASP Framework - Make your Classic ASP code work like in ASP.NET[^]A db grid control using ASP[^]Ajax with Classic ASP for EASY SIMPLE Inline Datagrid Database Table Updates Without Page Refresh[^]
1 Dec 2011 by Sergey Alexandrovich Kryukov
First of all, do you know that one can install .NET Framework v.4.0 on any system where v.3.5 can be installed; and I don't see any reason for not doing it. (This is v.4.5 which cannot be installed on XP.)However, you can re-target your projects to any version starting from v.2.0 (the .NET...
8 Apr 2012 by OriginalGriff
There is a very good chance that this won't work: I have yet to meet a flash drive with a serial number, but maybe that's because I buy cheap ones...Add a reference to System.Management, then:Dim all As New ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive WHERE...
7 May 2012 by VJ Reddy
If you want to include double quotes within a string in VBScript then please try "" for " within the string as a similar issue was solved using "" herehttp://www.codeproject.com/Messages/4224777/Re-Regular-Expressions-dealing-with-a-quote.aspx[^]
29 May 2012 by Dylan Morley
There's no 'button click event' as such in ASP. What you need to do is create an HTML form with a 'submit' type button that will post the content of the form to an ASP script. e.g.Then, create your ASP handler (in the...
1 Aug 2012 by Dynamsoft
In this article, I’ll show you how to capture images from your web browser, edit them, and then upload them to your system.
24 Aug 2012 by Joan M
check SQL Inject Me[^], it is an add-on for Mozzilla Firefox.I don't know if this is the best app or not... I guess this is really difficult to know as most of them will have pro's and con's. Anyway I guess that trying the same web site with as many of them possible will be the best...
25 Aug 2012 by Brandon Caruana
Use a tool like BackTrack Pen testing. http://www.backtrack-linux.org/[^]It will help you with so much more then just testing for sql injection attacks. There are a lot of other vulnerabilities to test for like x site scripting attacks.
17 Apr 2013 by Johnny J.
Adaption of pdoxtrader's codePublic Function BusIdExists(ByVal busid As String) As Boolean Dim thisSql As String = "SELECT Count(*) FROM [yourtable] WHERE busid=@busid" Dim rowCount As Integer ' Get the list of rows with that busid Using conn As New...
2 Jul 2013 by thanh_bkhn
Use {(}" for "(" and {)} for ")"
8 Sep 2013 by OriginalGriff
Well, if you are waiting for permission, consider it given.If you are waiting for us to explain or translate it, then you will be waiting a very, very long time!Do you have any idea how much work explaining code line by line is?Every single line needs a paragraph of explanation! For...
26 Nov 2013 by martene
The word "Focus" means that a particular control (e.g. a textbox) is in focus or not. When a user clicks on/in a control like textbox then this control gets all the input (through the keyboard) from the user. When a user presses the TAB button on the keyboard like we do all the time filling up...
31 May 2014 by Mike Meinz
To do it via the keyboard, in PowerPoint select File, Save As and then select the Save as Type: Windows Media Video (*.wmv)To do it through VBA, use the Export method in the Presentation object.See Presentation.Export Method (PowerPoint)[^]This VBScript[^] example (found using Google...
23 Nov 2014 by OriginalGriff
I have absolutely no idea what you mean by "suggest me with the suitable array list" - you shouldn't be using ArrayList anyway, there were superseded by the Generic List class many years ago...But...if you create a dynamic check box (and generally speaking, it's a poor idea, there are...
27 Mar 2015 by CHill60
If this is for a final year project to be completed in 3 months time then you should have started earlier! You are hardly a beginner if this is your final year project either.As for the requirements - that is for you to complete if you expect to graduate.Some research may be useful - for...
15 May 2015 by Anele 'Mashy' Mbanga
Create JQuery Mobile Apps with JQM.Show on your PC with these tools.
6 Jun 2015 by ZurdoDev
See http://stackoverflow.com/questions/17094281/getting-invalid-procedure-call-or-argument-in-vbscript[^]This is because you have encrypted the value into something that .WriteLine can't write to the file.
5 Jan 2016 by Leo Chapiro
You need to do it recursively, take a look (it is just an example):sub RecursiveDeleteByExtension(byval strDirectory,strExtensionsToDelete) DIM objFolder, objSubFolder, objFile DIM strExt set objFolder = objFSO.GetFolder(strDirectory) for each objFile in objFolder.Files for each...
12 Jan 2016 by Garth J Lancaster
First off ... ".vbs (text .txt)" - thats expressed a bit 'awkwardly' - You're learning VBScript, its representation is 'text', and (by convention) an extension of '.vbs' on a file means it can be executed by the Windows Script Host - you could put your script into a file with a ".txt" extension...
16 Feb 2016 by Dave Kreskowiak
You cannot protect a BAT file at all. It won't run as anything other than a normal text file.VBScript can be done, albeit not that securely, using the Script Encoder built into the Windows Script host can help a bit. You can find an example here[^].Overall, if protecting the code was a...
14 Feb 2020 by OriginalGriff
You can't bypass UAC - that's the whole point! If you could bypass UAC then two things would happen: 1) Users wouldn't know that what an app is about to do is potentially dangerous and / or damaging to their system. 2) If you could do it, so...
28 May 2020 by phil.o
Try yyyyMMMdd as format, which would lead to 2021May29. MR isn't a valid month name abbreviation, and there does not seem to exist any format specifier which would lead to an abbreviated month name to only 2 characters. MMM would yield Jan, Feb,...
23 Sep 2020 by Dave Kreskowiak
VBS is VBScript. IT's VERY different from VB.NET, which is what you appear to be writing code in. But you're not even asking about anything VB.NET related. You're asking how to see the class/method headers list in Visual Studio. Go to the Tools...
28 Jan 2021 by Maciej Los
I'd avoid of using: Set re = CreateObject("VBScript.RegExp") I'd suggest to create Regex object via using reference to Microsoft VBScript Regular Expressions x.x.dll, where x.x is version number. Then, you'll be able to create object via...
8 Sep 2023 by OriginalGriff
The simplest way is to copy the entire database as a file, then connect to it and delete all the information. That way, you also copy any stored procedures, functions, triggers, and so on as well as the table format.
11 Dec 2007 by Andrew Friedl
Using the KudzuASp Template Engine for Classic ASP
8 Oct 2008 by Mohammad Dayyan
Hi all.How can I send a Form with AJAX (Post method)?It means is there a free AJAX script about it Thank you
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.
26 May 2009 by adatapost
Please refere this link http://www.highdots.com/css-tab-designer/[^] A DATAPOST COMPUTER CENTRE (K.V Prajapati)
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.
27 Jan 2010 by Christian Graus
If you're using VBScript, it would be good to know where you expect it to work ? Is it inside Access ? Are you writing a web app that will only support IE ? Also, don't post answers that are really just you complaining, edit your post to add details.
15 Feb 2010 by Christian Graus
I doubt very much that your question is about VBScript.I'd recommend buying a good book on winforms, or reading some of the CP articles that contain controls written in VB.NET. There's just no way it can be explained in a forum reply.
2 Mar 2010 by Rudy du Plooy
Set oshell = createobject("Wscript.Shell") oshell.run"cmd.exe" wscript.sleep 500 oshell.sendkeys "net stop ""Your service name here"""+("{Enter}") wscript.sleep 5000 oshell.sendkeys "net start ""Your service name here"""+("{Enter}") wscript.sleep 5000 ...
19 Mar 2010 by AspDotNetDev
Since you tagged this with ASP.NET, I thought I'd mention that default.aspx acts like index.html in that you can just point to the parent directory and the default.aspx page in that directory will automatically be used.
3 Apr 2010 by Ankur\m/
You can do it using JavaScriptJavascript Function:function disableListBox(){ document.getElementById("ListBox1").disable = true;}
3 May 2010 by Sandesh M Patil
You seem to be missing .Also, make sure you've included the AjaxControlToolkit's DLL in your project. You can also check outLink for some tips on fixing AJAX problemsHope this may help u... :)
29 Jun 2010 by crackruckles
Days Left Timer VBS self deleting
16 Aug 2010 by Mukund Kallapur
Hello All,I am trying to use a Custom Validator for the validation of the Length of the User Name. I am using VBScript as the scripting language.But when I try to run the code i am getting an Error.Below is the script which I am using in m ASP.NET page. Sub Validate...
24 Aug 2010 by Uwe Keim
Seems that the recursion [^] is missing in your method?CheersUwe
24 Aug 2010 by Christian Graus
So what you mean is that you want to read the byte data, and view it as a list of decimal numbers ? File.ReadAllBytes will give you a byte array, then you can use a string builder and foreach to iterate over that, and build your list of numbers. ASCII is the older way of encoding text, if you...
21 Sep 2010 by Tony Richards
Your first steps should be:Confirm the text.txt file exists.Confirm you can read and write to the file in Notebook => If not you might have user permissions problems.To give more help we'll need to which line is causing the error.When you have more info, edit your question, please...
20 Dec 2010 by Imran Saiyed
Dim IntVal as LongIntVal = Hex2Dec(hexVal)
8 Feb 2011 by Nish Nishant
Try something like this:Set WshShell = WScript.CreateObject("WScript.Shell")WshShell.Run "sdelete -z D:\temp "
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.
2 Mar 2011 by Member 7720610
First of all I'm sorry if this is in the wrong place. I'm new here and not sure how the system works yet. I am a programmer with both a linux and a windows server at my disposal. I provide a marketing service which includes a website where my clients can sell products. Here is my question. ...
14 Mar 2011 by OriginalGriff
You are looking for a regular expression. This is what Expresso came up with:' Imports System.Text.RegularExpressions' Regular expression built for Visual Basic on: Mon, Mar 14, 2011, 01:42:46 PM' Using Expresso Version: 3.0.3634, http://www.ultrapico.com'' A description of the...
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.
18 Mar 2011 by Yusuf
Well, to start off use FileSystemObject.CopyFile to copy the file (see doc[^])Once you copy the file you need to rename it, right? to do so you FileSystemObject.MoveFile , see doc[^]
31 Mar 2011 by Sandeep Mewara
Tag: VBScriptQuestion: "what are the codes included to get a salary of an employee":doh:No effort from your side - nor in trying your homework + nor in formulating it and presenting it as a question.How will we help you here? Here is what is expected by enquirers:1. TRY first...
17 Apr 2011 by OriginalGriff
This probably shouldn't be under Questions & Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.Posting this here relies on them...
21 Apr 2011 by Sandeep Mewara
Look at this:An A-Z Index of Windows VBScript commands (WSH)[^]Wouldn't the combination of these two command do for you: Asc(String) Return ASCII code for string AscW(String) Return Unicode code for string
27 Apr 2011 by ankitjoshi24
HiI was wondering if there is way to write a DLL which calls and external VBScript file.Or is there a way to write a vbscript code in a dll file??--AJ
27 Apr 2011 by Nish Nishant
If they are loose vbscript files, then you can just ShellExecute them.Alternatively, if you want to host the VBScript engine in your app, see this article:How to add support for hosting VBScript to an ATL application[^]
11 May 2011 by Manfred Rudolf Bihy
Follow the thread on this site: http://www.tek-tips.com/viewthread.cfm?qid=886987&page=356[^]. This should give you a couple of ideas on how to proceed.Best Regards,-MRB
11 May 2011 by Rick Shaub
I think this link should get you started: http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/4c1dc942-da7b-427d-9a5f-52b9354dac2b/[^]
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 May 2011 by Sergey Alexandrovich Kryukov
It sounds like a most dirty solution. Get rid of it until it's not too late. Look at what script is doing and decide what to do. Whole thing does not look reasonable. Any periodic task not driven by real events should not be used.—SA
22 Jun 2011 by Maciej Los
You need to loop until Execute() is true.Do while objSelection.Find.Execute() 'code to make changes in textLoop
2 Jul 2011 by harish85
I think first as start you can go through the bit torrent protocol and its normal mechanism,Here is the fav wiki page for it http://en.wikipedia.org/wiki/BitTorrent_(protocol)[^]Then, Here is open source hosted in google base for peer to peer communication- you can check this out...
5 Jul 2011 by Dave Kreskowiak
Guy...you've asked a ton of questions on the same subject, all for a thesis. If you can't do your own research, you're going to fail this project, badly.You have to know not just your own project inside and out, but all the research surrounding it. Like, why did you didn't take this route...
5 Jul 2011 by Christian Graus
Just to add to Dave's comment, there's source code to do all this, easily found with google. So if you can't use google, what are the odds that you deserve to pass your course ? You need to do more than google and reuse code, you need to understand how it works, or you will fail.