This file contains hidden or 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 Draft_An_Email() | |
Dim olMail As MailItem | |
Dim My_Email_Account As Account | |
Set My_Email_Account = Session.Accounts("<Your Email Account Address>") | |
Set olMail = CreateItem(olMailItem) | |
With olMail |
This file contains hidden or 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
import os | |
folderPath = r'<Folder Path>' | |
fileSequence = 1 | |
for filename in os.listdir(folderPath): | |
os.rename(filename, 'NewFileName_' + str(fileSequence)) | |
fileSequence +=1 |
This file contains hidden or 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 As Object | |
Dim Folder_Path As String | |
Private Sub Init() | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Folder_Path = "<Your Folder Path>" |
This file contains hidden or 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
import os | |
folderPath = r'<Your Folder Path>' | |
fileNumber = 1 # file sequence number | |
for filename in os.listdir(folderPath): | |
os.rename(filename, 'Your file name' + str(fileNumber)) | |
fileNumber +=1 |
This file contains hidden or 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 Find_Previous_Demo() | |
Dim fc As Range | |
Set fc = Columns("C").Find("red") | |
Debug.Print fc.Address | |
Set fc = Columns("C").FindNext(fc) | |
Debug.Print fc.Address | |
Set fc = Columns("C").FindPrevious(fc) |
This file contains hidden or 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 Lookup_Demo() | |
Dim ColorName As String, firstAddress As String | |
Dim rangeLookup As Range, rangeOutput As Range | |
Dim v As Range | |
ColorName = "Red" | |
Set rangeLookup = Range("C3:C8") | |
Set rangeOutput = Range("D3:D8") |
This file contains hidden or 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
import matplotlib.pyplot as plt | |
from matplotlib.widgets import LassoSelector | |
fig, ax = plt.subplots() | |
def onSelect(x): | |
print(x) | |
def onPress(event): | |
print('Mouse pressed') |
This file contains hidden or 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
from datetime import datetime | |
import xlsxwriter as xw | |
expenses = ( | |
['Rent', '2019-05-01', 1500], | |
['Gas', '2019-05-15', 20.50], | |
['Grocery', '2019-05-16', 100], | |
['Phone Bill', '2019-05-21', 59.99], | |
) |
This file contains hidden or 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
import xlsxwriter as xw | |
wbFormatTable = xw.Workbook('Format Table.xlsx') | |
wsTransaction = wbFormatTable.add_worksheet('Transactions') | |
transactions = ( | |
['5/1/2019', 'Buy', 100.00], | |
['5/2/2019', 'Sell', 200.00], | |
['5/3/2019', 'Buy', 300.00], | |
['5/4/2019', 'Sell', 400.00], |
This file contains hidden or 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
import xlsxwriter as xw | |
wbTransaction = xw.Workbook('Transaction Table.xlsx') | |
wsTransaction = wbTransaction.add_worksheet('Transactions') | |
transactions = ( | |
['Tran Date', 'Tran Type', 'Tran Amount'], | |
['5/1/2019', 'Buy', 100.00], | |
['5/2/2019', 'Sell', 200.00], | |
['5/3/2019', 'Buy', 300.00], |