Author: Keith

  • Why Use VBA in Excel?

    Excel VBA, or Visual Basic for Applications, is a programming language that allows developers to automate tasks and build applications within the Excel environment. Utilizing Excel VBA can dramatically improve your productivity and increase your Excel skillset, as well as provide you with the opportunity to create customized macros for your business’ specific needs. Here…

  • Why Object-Oriented VBA?

    “Object-oriented programming is an essential concept in modern software engineering that encapsulates data and functionality within a single entity called an object. Microsoft’s Visual Basic for Applications (VBA) is a popular programming language used in creating software for Microsoft Office applications like Excel and PowerPoint. Although VBA has its roots in traditional procedural programming, it…

  • The Importance of Visual Basic for Applications (VBA)

    Visual Basic for Applications (VBA) is a programming language that is used to automate tasks in Microsoft Office applications, including Excel, Word, and PowerPoint. VBA allows users to create customized macros, automate repetitive tasks, and interface with external software, making it an essential part of many businesses’ software workflows. In this blog post, we’ll discuss…

  • Laptop Deals

    MacBook Pro SAVE HUNDREDS on Renewed/Reconditioned models that are in PERFECT CONDITION

  • ReturnName

    Function ReturnName(ByVal num As Integer) As String ReturnName = Split(Cells(, num).Address, “$”)(1) End Function

  • DeleteInitialColumnsFromWorksheet

    Note: This function depends on ReturnName Sub DeleteInitialColumnsFromWorksheet( _ ws As Worksheet, _ NumberOfColumns As Integer _ ) With ws .Columns( _ ReturnName( _ 1 _ ) & _ “:” & _ ReturnName( _ NumberOfColumns _ ) _ ).Delete _ Shift:=xlToLeft End With End Sub

  • DeleteBottomRowsFromWorksheet

    Note: This method depends on GetLastUsedRowNumberInWorksheet Sub DeleteBottomRowsFromWorksheet( _ ws As Worksheet _ ) Dim _ strStartingEmptyRow As String, _ rngStartingRow As Range, _ rngEmptyRows As Range, _ lngLastRow As Long lngLastRow = _ GetLastUsedRowNumberInWorksheet( _ ws _ ) If lngLastRow = _ -1 Then Exit Sub End If strStartingEmptyRow = _ CStr( _ lngLastRow…

  • GetLastUsedColumnNumberInWorksheet

    Function GetLastUsedColumnNumberInWorksheet( _ ws As Worksheet _ ) As Long Dim _ rng As Range, _ rngResults As Range Set rng = _ ws.Cells Set rngResults = _ rng.Find( _ what:=”*”, _ After:=rng.Cells(1), _ Lookat:=xlPart, _ LookIn:=xlFormulas, _ SearchOrder:=xlByColumns, _ SearchDirection:=xlPrevious, _ MatchCase:=False _ ) If _ rngResults Is Nothing _ Then GetLastUsedColumnNumberInWorksheet = _…

  • GetLastUsedRowNumberInWorksheet

    Function GetLastUsedRowNumberInWorksheet( _ ws As Worksheet _ ) As Long Dim _ rng As Range, _ rngResults As Range Set rng = _ ws.Cells Set rngResults = _ rng.Find( _ what:=”*”, _ After:=rng.Cells(1), _ Lookat:=xlPart, _ LookIn:=xlFormulas, _ SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious, _ MatchCase:=False _ ) If _ rngResults Is Nothing _ Then GetLastUsedRowNumberInWorksheet = _…

  • DeleteAllConnectionsFromWorkbookOfType

    Public Function DeleteAllConnectionsFromWorkbookOfType( _ wb As Workbook, _ xlconnType As XlConnectionType _ ) Dim _ wbcn As WorkbookConnection For Each wbcn In wb.Connections If wbcn.Type = xlconnType Then wbcn.Delete End If Next wbcn End Function