• Excel to pdf

    VBA macro print as PDF

    A very helpful VBA macro that turns any printable excel document into a PDF file. Convert excel to pdf or save excel to pdf Sub savepdf() mo= Month(Date) d = Day(Date) y = Year(Date) h = Hour(Now) m = Minute(Now)…

  • Excel Macro,  VBA

    Excel macro for loop

    This is a tutorial for beginners to learn excel macro for loop. Loop sequences may be achieved by using a FOR block or a WHILE. Macro for loop using FOR A FOR block looks like this: For i = 1…

  • VBA

    Run macro on open file event

    In order to run macro on open file event you need to have the VBA code (macro) inside the Workbook_Open() event in ThisWorkbook element on Project Explorer. You must first open the VBA editor in Excel and type your macro…

  • VBA

    Excel VBA Macro Exercise

    This is a tutorial for anyone wanting to learn how to write their first excel vba macro. These macros are very useful when we need to do a lot of manual work on large data tables and these manual actions…

  • Combobox VBA

    Combobox VBA – populating with items

    Comboboxes are user friendly data input forms that can make the difference between a quality looking form and a archaic data input screen. Defining combobox in Excel For this step you must go to the Excel Developer menu, make sure…

  • Reading from SQL

    Reading from SQL table in VBA Excel

    Reading from SQL tables usually means that there is a need for supplementary data processing and manipulation before conclusions and information being provided to the decision making person. Excel is the best application to satisfy this need and some very…

  • VBA

    Excel file unsaveable

    Some companies use Excel files through intranet networks for all their staff to have access to certain information and automated reports. This usually means that this kind of file should be unsavable by the staff in order to preserve a…

  • Connecting to SQLServer VBA

    Connecting to SQL Server in VBA Excel

    Building automated reports in Excel by connecting directly to an ERP database is a good shortcut to have fresh and accurate information to base your decisions on. This method facilitates data processing and manipulation in VBA before results and conclusions…