Dash board
Library
Code Vault
Pro Chat
Events
lab
Files
Support
Client Dashboard

Welcome to your dashboard.

Oops.. You Need to Sign In!

Click the button below to sign in or register.
We are not responsible if something goes wrong
Course Library
My Courses (Enrolled)
Get All Access Pass with Excel Ninja Pro - Click here to sign up!
course library
Free

Excel VBA Crash Course

FREE - Learn to write macros from scratch, make buttons and simple procedures to automate tasks. Play with Loops and Excel Triggers. Teach Excel to make decisions with Conditional Logic and much more!

$12

Time, Money and Efficiency Hacks

In this mini-course, we explore productivity hacks to get more done with less time or money. Test Windows or Office versions for under $20, Create VMs you can open like an app, type an email with a few keystrokes!

Free

ExGrid Mega Templates Pack

This MEGA Template pack comes with complete source codes and complex examples of the amazing ExGrid control and it's diverse feature set!

$24

Image and Background Hacks In Excel VBA

Use images in Excel/VBA to enrich the end-user experience. Learn our best image tricks learned over years of experience, trial & error. Includes Bonus Pack of Images, Icons, Backgrounds, Textures & Mouse Cursors!

Free

Live Q&A With Dan Strong

If you didn't get a chance to join our Facebook Live Q & A sessions, you can view the replays here, divided into separate videos so you can find your topic easier.

$135

Advanced Grid Controls In Excel VBA with ExGrid

Learn to edit & control data with Grids. Utilize the ExGrid control on an Excel sheet or Userform, including the ability to sort, filter, group and apply conditional formatting. Protection & manipulate your data like never before!

$99

The Ultimate Excel VBA Course 2.0

Start writing VBA code you can use right away at work. No programming knowledge is required for this VBA course!

$44.00

Software Code Signing For Enhanced Security and Brand Trust

Remove AntiVirus and Microsoft Authenticode Warnings and Build Trust Using OV and EV Code Signing Certificates.

$54

Automate Emails From Excel VBA: Microsoft Outlook Mastery

Create And Manipulate Outlook Emails, Attachments, Calendars, Tasks, and Contacts Automatically With Excel VBA. It's super fun and saves time!

Free

Excel VBA for Business: Barcodes

An excellent beginner's guide to making your own Excel VBA Programs. Simplify your life using Barcodes in this fun Step-by-step inventory system project!

$44

Excel To EXE, Make Secure Windows Applications From Excel

Excel passwords can easily be broken and your work stolen? Learn the secrets of true Excel security and Go Beyond Excel's Built-In Security Tools, Boost Features, Lock Down & Create Windows Applications (EXE) with XLSPadlock.

$44.00

Excel VBA Formulas, Functions, UDFs + Create Your Own AddIn!

Learn to Build Your Own Custom Functions (User-Defined Functions), Master the plethora of Built-In VBA Functions, and Learn To Share Them with others!

$44.00

The Ultimate Excel VBA Arrays Course

Learn To Manipulate Data Invisibly and At Lightning Speeds with Arrays! Arrays are present in most programming languages, but most people don’t take the time to master them & get frustrated when their code seems sloppy, difficult to read, and often can take a long time to run.

$54

Complete Web Automation with Excel VBA

Use Excel to Control popular Web Browsers! Learn Web Scraping, Fill Out Web Forms Dynamically, Navigate Web Pages Intuitively, And Extract & Manipulate Data To Increase Efficiency!

$34.00

Excel VBA to PDF Forms Mastery Course

Stop Filling Forms the Hard Way, Use Excel To Automate Your Workflow! This course deep-dives into an automation technique that stores form data in .FDF forms, which can be written using Excel without the need for expensive Adobe software!

My Courses (Enrolled)
Search, Copy & Paste Excel VBA codes! (Ninja Pro Only)

Ninja Pro Code Vault

Search hundreds of codes in our code library. Download Excel Templates, Swipe Files & Excel Resources.
SIGN UP RIGHT NOW

Code Vault

DescriptionCodeExampleUse Case
GeneralGeneralGets the last row on the ActiveSheet (whatever sheet is currently active) in column A (1st column)Function getLastRow()
    'gets last row on current sheet
    getLastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
End Function
'get the last row for the current sheet into variable wsLR
wsLR = getLastRow()
You have to find the boundaries of a table or range. The best way to do that is to find where the last row is and then form the boundaries from there.
Example: Your table is columns A, B and C. It grows as more entries are added. Your macro needs to run a Vlookup on that table using the correct amount of fields.
So, you get the last row in order to get the accurate table length.
searchTerm = "Dan"
foundJobTitle = Application.WorksheetFunction.Vlookup(searchTerm, ActiveSheet.Range("A2:C" & getLastRow() ), 2, 0)
GeneralGeneralGets the last row on the ActiveSheet (whatever sheet is currently active) in column A (1st column)Function getLastRowCustSht(shtName)
'gets last row in col A on a custom sheet

'put the name of the sheet in the shtName parameter
getLastRowCustSht = Sheets(shtName).Cells(Rows.Count, 1).End(xlUp).Row
End Function
'get the last row in col A for sheet named "Sheet3" into variable wsLR
wsLR = getLastRowCustomSht("sheet3")

'get the last row in col A for sheet named "Employees" into variable empLR
empLR = getLastRowCustomSht("Employees")
Files, FoldersVBA FunctionsCreate a Folder and all subfolders at once with this custom VBA function. If one of the folders already exists, it will move forward without trying to create it.Public Sub makeFolder(filePath As String)
Dim arrFolders, i As Integer, strPath As String, ws as Worksheet

Set ws = ThisWorkbook.Sheets("Sheet1")

'segment all folders and subfolders
arrFolders = Split(filePath, "")

'loop through all folders.
For i = 0 To UBound(arrFolders) - 1
      strPath = strPath & arrFolders(i) & ""

      'If folder doesn't exist, make it.
     If Not FolderExists(strPath) Then MkDir strPath
Next i

End Sub
'make a folder and ALL needed subfolders from a variable
Dim curPath as String
curPath = "C:makethisfolderpath"
makeFolder curPath

'make a folder from a cell value (cell c5 on sheet2)
makeFolder Sheet2.Range("c5").Value
General, Files, FoldersGeneral, VBA Functionsdynamic testPublic Sub makeFolder(filePath As String)
Dim arrFolders, i As Integer, strPath As String, ws as Worksheet

Set ws = ThisWorkbook.Sheets("Sheet1")

'segment all folders and subfolders
arrFolders = Split(filePath, "")

'loop through all folders.
For i = 0 To UBound(arrFolders) - 1
    strPath = strPath & arrFolders(i) & ""

'If folder doesn't exist, make it.
If Not FolderExists(strPath) Then MkDir strPath
Next i

End Sub
'make a folder and ALL needed subfolders from a variable
Dim curPath as String
curPath = "C:makethisfilepath"
makeFolder curPath

'make a folder from a cell value (cell c5 on sheet2)
makeFolder Sheet2.Range("c5").Value
test
Ninja Pro Chat (Coming Soon for Ninja Pro Members)
Upcoming Events (Ninja Pro Only)
Lab Contents (Ninja Pro Only)
Latest File Uploads (Ninja Pro Only)
Download
Another Tab Contents
X

Forgot Password?

Join Us

0
    0
    Your Cart
    Your cart is emptyReturn to Shop