Welcome To Snipplr


Everyone's Recent Visual Basic Snippets



« Prev 1 2 3
  1. FAV

    Read data from txt files

    Read data from TXT files to import them in Excel environment
    Visual Basic 24 views posted 2 years ago by buglilorenzo
  2. FAV

    Example of VB6 Sample SMS Code - Messaging API

    The following example of VB6 sample SMS code uses an expedient object, contingent on the HTTP API.
    Visual Basic 6 views posted 2 years ago by Broadnet
  3. FAV

    Excel (VBA) worksheet password cracker (Ver 2010 & below)

    If you've forgotten a password to an Excel workbook that was created in version 2010 or older. See URL for more details.
    Visual Basic 5 views posted 3 years ago by cueballrawn
  4. FAV

    Excel (VBA) drop down list multiple values in single cell

    Selecting different values from a data validation drop down list will populate the same cell, i.e. it will create a concatenating list separated by commas. Amend the "If Target.Column" values to set the columns this applies to.
    Visual Basic 4 views posted 3 years ago by cueballrawn
  5. FAV

    Excel (VBA) Custom right-click menu to launch macros

    Create a custom right-click menu that will list and launch all macros in the DemonstationMacros module. Copy and past the code into the relevant object or module.
    Visual Basic 4 views posted 3 years ago by cueballrawn
  6. FAV

    Access (VBA) Import CSV files into database

    Import CSV files into a named table in Access database. Use to bulk load tables.
    Visual Basic 4 views posted 3 years ago by cueballrawn
  7. FAV

    Excel (VBA) list all filenames in a directory

    Lists all filenames in a directory if you need them for formulae or add into VBA.
    Visual Basic 4 views posted 3 years ago by cueballrawn
  8. FAV

    Excel (VBA) Hash string using SHA1 - pseudonymisation

    Create a bespoke Excel function that allows you to hash (anonnymise / pseudonymise) strings such as unique identifiers. Once you've inserted the VBA, use the function "=BASE64SHA1(cellreference)" to generate the hash.
    Visual Basic 9 views posted 3 years ago by cueballrawn
  9. FAV

    Excel (VBA) create list of all worksheet names in workbook

    This inserts a new column in the active worksheet and lists all the worksheet names, using a row for each name. Useful if you have lots of worksheets names that you want to reference accurately.
    Visual Basic 6 views posted 3 years ago by cueballrawn
  10. FAV

    Access (VBA) Open and run macro from an Excel workbook

    This code allows you to open an Excel workbook from an Access database and run macros within the target workbook. This could be used to format / clean data prior to import for example.
    Visual Basic 5 views posted 3 years ago by cueballrawn
  11. FAV

    Excel (VBA) hide specific worksheets

    Hide specific worksheets in a workbook that contain a prefix. This example uses "Admin_", although this can be changed easily.
    Visual Basic 2 views posted 3 years ago by cueballrawn
  12. FAV

    Excel (VBA) unhide all worksheets

    VBA to unhide all worksheets in an Excel workbook.
    Visual Basic 4 views posted 3 years ago by cueballrawn
  13. FAV

    Generate SQL query for column matching

    Written as reply to question on ittoolbox.com:"I need to execute a query in vb which can find multiple value provided by the user to find from a single column of a table." [http://database.ittoolbox.com/groups/technical-functional/sql-l/query-to-fin...
    Visual Basic 5 views posted 4 years ago by bvwatson
  14. FAV

    Calculate the Center Moving Average

    Calculates the center moving average for a time period. The vA requires a range or an array of numbers and the iSteps takes the number of periods in the timeframe (4 for quarters, 7 for weekly, ect)
    Visual Basic saved by 9 people 7 views posted 4 years ago by BDOGG32
  15. FAV

    Extract text from a String

    Two functions that can extract text from a string. Must have the Option Compare Text at the top of the module.
    Visual Basic saved by 2 people 6 views posted 4 years ago by BDOGG32
  16. FAV

    StripCharacters

    Uses regular expressions to do string manipulation. Enter a regular expression into the required parameter and what you want the manipulation to do and it will process the string manipulation. For example if A1 contains John Doe1, Jane Doe2, John W...
    Visual Basic saved by 32 people 7 views posted 4 years ago by BDOGG32
  17. FAV

    SpeedOn and SpeedOff

    Code to turn certain feature off and on for faster running of code in Excel
    Visual Basic saved by 1 person 10 views posted 4 years ago by BDOGG32
  18. FAV

    Trading at www.cex.io ( VB Script ) - Create your own Bitcoin Trading BOT

    ' ' ' 1, Create your cex.io account from https://cex.io/r/0/rbillig/0/ ( mandatory ) ' 2, Tranfer Bitcoins to you account ' 3, Under your CEX account, create a public and secret key ' 4, Modify the 3 vars below ( G_USERNAME, G_APIKEY...
    Visual Basic 10 views posted 6 years ago by rbillig
  19. FAV

    How to change selected item on combobox in code behind

    Example to change the selected item in a ComboBox, in code behind. For VB.Net
    Visual Basic 4 views posted 6 years ago by keidash
  20. FAV

    Time Based Gantt Chart in Excel

    I wanted a time based gantt chart in excel. Robert's excel template was very useful. The hourly gantt chart was not useful to visualize my needs. I need something with 10 mins precision to analyse patterns in jobs that are running under 15 mins. So t...
    Visual Basic 5 views posted 6 years ago by mprabhuram
  21. FAV

    Banding of timestamp or date into 5 min bands using excel

    This would round down the time stamp to the nearest 5 minute interval based on first interval being 00:00:00.
    Visual Basic 1 views posted 6 years ago by mprabhuram
  22. FAV

    Sheets_List_From_File

    lists sheets without opening the file
    Visual Basic 3 views posted 6 years ago by lolrenx
  23. FAV

    Dictionary loader

    short loop to load a dictionary
    Visual Basic 3 views posted 7 years ago by lolrenx
  24. FAV

    Range to String

    Concatenate all text in cells with defined separator
    Visual Basic 5 views posted 7 years ago by lolrenx
  25. FAV

    Format Header Range

    quick way to get column headers formatted
    Visual Basic 4 views posted 7 years ago by lolrenx
  26. FAV

    Datarange as Class

    consider currentregion as a 'datarange' custom class
    Visual Basic saved by 4 people 1 views posted 7 years ago by lolrenx
  27. FAV

    Copy rows based on criteria to a new sheet or file

    Copy rows based on criteria to a new sheet or file
    Visual Basic 4 views posted 7 years ago by angelia
  28. FAV

    'Append data from multiple worksheet to single worksheet macro

    'Append data from multiple worksheet to single worksheet macro
    Visual Basic 4 views posted 7 years ago by angelia
  29. FAV

    Return File Reference

    Used to invoke a GetSaveAsFileName dialogue box
    Visual Basic 3 views posted 7 years ago by sjmoorecouk
  30. FAV

    Convert Excel plain text links to hyperlinks

    Save the following code as a macro and then apply it to the fields you want to convert
    Visual Basic 5 views posted 7 years ago by kidmizere
« Prev 1 2 3