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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Sub Small_All() | |
'Application.ScreenUpdating = False | |
'Application.Visible = False | |
Worksheets("Snapshot").Range("C16").Value = "" | |
Sheet1.Range("A4").Value = "U15154108-23 Client" | |
Sheet1.Range("A10:Z1000").Clear | |
PORT_RefDataExample | |
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
Sub sbAutoAdjustColumnRowWidth() | |
'Auto ColumnFit | |
Columns(2).AutoFit | |
'Auto RowFit | |
Rows(2).AutoFit | |
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
Sub Email_Inputs() | |
Dim myFile As String, Text As String, textline As String | |
Dim D_1 As String, D_2 As String, D_3 As String | |
Dim email1 As String, pmname1 As String ', senddisplay As String | |
myFile = "F:\Ultimus_FTP\Script Files\MFTrades_Email_To.txt" | |
Open myFile For Input As #1 |
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
@echo off | |
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a" | |
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%" | |
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" | |
set "datestamp=(%YYYY%.%MM%.%DD%)" & set "timestamp=%HH%%Min%%Sec%" | |
set "fullstamp=%YYYY%.%MM%.%DD%_%HH%-%Min%-%Sec%" | |
echo datestamp: "%datestamp%" | |
echo timestamp: "%timestamp%" | |
echo fullstamp: "%fullstamp%" |
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
:R*?:ddd:: | |
FormatTime, CurrentDateTime,, dd/MM/yy | |
SendInput %CurrentDateTime% | |
return | |
:R*?:xxx:: | |
FormatTime, CurrentDateTime,, yyMMddHHmmss | |
SendInput %CurrentDateTime% | |
return | |
:R*?:aaa:: | |
FormatTime, CurrentDateTime,, yyMMdd |
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
'************ CleanFileName(strText As String) As String ********** | |
Function CleanFileName(strText As String) As String | |
Dim strStripChars As String | |
Dim intLen As Integer | |
Dim i As Integer | |
strStripChars = "/\[]:=," & Chr(34) | |
intLen = Len(strStripChars) | |
strText = Trim(strText) | |
For i = 1 To intLen |
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
REM YTD Parameters*************** | |
REM Set a=$({bdty}) | |
REM Set b=$({toda}) | |
ASK a "Enter a start date in the format mmddyyyy" | |
ASK b "Enter an end date in the format mmddyyyy" | |
MESSAGEBOX d ! YesNoCancel 2 "Do you want to run for an individual portfolio? (<> @BIPortfolios)?" | |
IF "%d" == "cancel" GOTO end |
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
Function FileExist(FilePath As String) As Boolean | |
'PURPOSE: Test to see if a file exists or not | |
'SOURCE: www.TheSpreadsheetGuru.com/The-Code-Vault | |
'RESOURCE: http://www.rondebruin.nl/win/s9/win003.htm | |
Dim TestStr As String | |
'Test File Path (ie "C:\Users\Chris\Desktop\Test\book1.xlsm") | |
On Error Resume Next | |
TestStr = Dir(FilePath) |
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
;------------------------------------------------------------------------------ | |
; Disable Insert key | |
;------------------------------------------------------------------------------ | |
$Insert::return | |
!Insert::Send, {Insert} ; Use Alt+Insert to toggle the 'Insert mode' | |
;------------------------------------------------------------------------------ | |
; Hand tool with middle button in Adobe Reader | |
;------------------------------------------------------------------------------ | |
#IfWinActive ahk_class AdobeAcrobat |
OlderNewer