Simple VisualBasic script
This is a simple demonstration of input, output and a small calculation done in VisualBasic.
The script asks the user to input a number of days, and the script
outputs how many seconds those days are.
The code is simple, open up notepad, or your text editor, and enter this:
1 2 3 4 | Dim Input Input = InputBox("Enter a number of days") sek = (input * 84600) msgbox (input & " days, are " & sek & " seconds") |
Save this code as ”script.vbs” and double-click the file.
Another VisualBasic example is this script, which creates
a new folder -in the current script directory, named by the users input.
1 2 3 4 5 | Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") Dim Input Input = InputBox("Folder name?") fso.createFolder input |
Note: Since this is a script, and not a program, there’s no need of any
compilation or such, and the file size is very small.
If you have any comments or similar scripts you may post this below :)
