This has been updated and moved here: https://gist.github.com/codeartery/f9fa041933773628ddc9e60b67dfef20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'*********************** | |
'Name: Email Messages | |
'Author: Jeremy England | |
'Company: SimplyCoded | |
'Version: rev.001 | |
'Date: 1/02/2015 | |
'*********************** | |
Option Explicit | |
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject") | |
Dim objSHL : Set objSHL = CreateObject("WScript.Shell") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Message Box</title> | |
<meta http-equiv="x-ua-compatible" content="IE=9"> | |
<meta name="author" content="Jeremy England"> | |
<meta name="copyright" content="SimplyCoded"> | |
<meta name="last-modified" content="2015-11-10"> | |
<hta:application | |
border="thin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class Window | |
'@description: Create a custom window with MSHTA. | |
'@author: Jeremy England (SimplyCoded). | |
Private title, style, body, options, width, height, xpos, ypos | |
Private Sub Class_Initialize() | |
title = " " : width = 350 : height = 250 | |
xpos = "(screen.width - " & width & ")/2" | |
ypos = "(screen.height -" & height & ")/2" | |
style = "html{display:table;}body{display:table-cell;font-family:Arial;background-color:#f6f6f6;}html,body{width:100%;height:100%;margin:0;}" | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'*********************** | |
'Name: String Formatter | |
'Author: Jeremy England | |
'Company: SimplyCoded | |
'Version: rev.001 | |
'Date: 04/08/2016 | |
'*********************** | |
Option Explicit | |
Dim htm : Set htm = CreateObject("htmlfile") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'************************ | |
'Name: Disable Connection | |
'Author: Jeremy England | |
'Company: SimplyCoded | |
'Date: 10/01/2016 | |
'************************ | |
Option Explicit | |
Dim interface, interfaceName, interfaceTarget, available, verb | |
'Pick the Interface Name you want to disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class ClipBoardText | |
REM @author: Jeremy England ( SimplyCoded ) | |
REM @info: Set, get, append, and clear your clipboard text. | |
REM @mini: Class ClipBoardText:Property Get Text:Text=CreateObject("HTMLFile").parentWindow.clipboardData.getData("Text"):If IsNull(Text)Then Text="":End If:End Property:Property Let Text(s):CreateObject("WScript.Shell").Run "mshta.exe javascript:eval(""document.parentWindow.clipboardData.setData('text','"&Replace(Replace(s,"'","\\u0027"),"""","\\u0022")&"');close()"")",0,True:End Property:Sub ClearText:Text="":End Sub:Sub AddText(s):Text=Text&s:End Sub:End Class | |
Property Get Text | |
Text = CreateObject( "HTMLFile" ).parentWindow.clipboardData.getData( "Text" ) | |
If IsNull( Text )Then Text = "" | |
End Property | |
Property Let Text( str ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'create an arraylist | |
Set list = CreateObject("System.Collections.ArrayList") | |
'add values | |
list.add "mike" | |
list.add "jeremy" | |
list.add "kate" | |
list.add "alice" | |
'add a bunch of values easily via custom sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") | |
Dim wsh : Set wsh = CreateObject("Wscript.Shell") | |
Dim args : Set args = WScript.Arguments | |
Dim this : this = WScript.ScriptFullName | |
Dim id, ans | |
'create message boxes | |
If args.count = 0 Then | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Microsoft Excel Automation Basics | |
':: Create and edit an Excel File. | |
'--------------------------------- | |
'create the excel object | |
Set objExcel = CreateObject("Excel.Application") | |
'view the excel program and file, set to false to hide the whole process | |
objExcel.Visible = True |
NewerOlder