Skip to main content

Recently Updated Pages

Generating a Timestamp

Python

To generate a timestamp from datetime import datetime TimeStamp = datetime.now().strftime("%Y...

Updated 3 years ago by Nicholas Goh

Taking a screenshot

Python

Full Screen import pyautogui pyautogui.screenshot("C:\\Users\\Nicholas Goh\\Desktop\\test.png...

Updated 3 years ago by Nicholas Goh

Writing to CSV

Python

To write to a CSV file import csv header = ['name', 'area', 'country_code2', 'country_code3']...

Updated 3 years ago by Nicholas Goh

Creating and calling a Function

Python

Single Argument def AFunctionSample(SampleArg): print(SampleArg) AFunctionSample("Hello Wor...

Updated 3 years ago by Nicholas Goh

Detect OS Type

Excel VBA

Used to detect if OS Type is Windows or macOS Sub GetOSType() 'Get the OS that I am running...

Updated 3 years ago by Nicholas Goh

Delete a worksheet

Excel VBA

To delete a worksheet titled "Data" Sub DeleteSheet() Application.DisplayAlerts = False 'Rep...

Updated 3 years ago by Nicholas Goh

Get user desktop and make a folder

Excel VBA

Get user desktop and make a folder Dim DeskTop As String Dim WSH As Object Dim GetDesktopP...

Updated 3 years ago by Nicholas Goh

High Precision Timer using Windows API

Excel VBA

High Precision Timer using Windows API Private Declare PtrSafe Function QueryPerformanceCounter ...

Updated 3 years ago by Nicholas Goh

Add Worksheet if it does not exist

Excel VBA

Add a worksheet titled "Data" if it doesn't exist and ignore adding if it already exists Sub Add...

Updated 3 years ago by Nicholas Goh

Get current user name

Excel VBA

For a computer that is not joined to a domain (Computer Username) Sub Get_Username() 'Get the e...

Updated 3 years ago by Nicholas Goh