Here Is An Example Of The VBA Trim Function
The “Trim” function is useful in eliminating the blank spaces in a string normally caused by some data entry error. Why do you want to do this? Well because a sorting error can happen if you are trying to sort ” Dan, “Fred”, and “Ann”. ” Dan” will show up on top before “Ann” because […]
How To Search A String With The VBA Instr Function
The VBA Instr Function is very useful for searching a string for a particular piece of text. If for example you want to loop a column or a field in a table of multiple rows, and want to identify prize rows that are 81.51, you would write something like this: Sub VBAInstrFunction() Dim dblTemp As […]
How To Write A Recordset To File With VBA
In this video you’ll find out how to write a recordset to a file with VBA using the Microsoft Scripting Object. You’ll find out how to take your table data, and export it to a csv formatted file so you can share it with other applications. Use this method to get your data out of […]
Excel VBA Read Text File
So how can you import the contents of a csv or text file into your Excel worksheet: Find out: ‘======================================================== ‘DESIGNED & CODED BY LOEBLCOM SERVICES 2013 ‘ERIK LOEBL(713)409-7041 ‘EMAIL: erik@loeblcomservices.com ‘WEB: http://loeblcomservices.com ‘======================================================== Sub query_text_file() ‘PURPOSE: Query A Text File ‘************************************* ‘clear ‘Text File Contents’ worksheet ‘************************************* Worksheets("Text File Contents").Select Range("A2:K6500").Clear ‘************************************* ‘now populate […]
VBA Read Excel File
Here is a question I received “Thanks for the video, I have a question.How to read from a group of closed excel files searching for a certain value in say column F then if that value is found then copy that row to a workbook and continue search for then next value ” So I […]
VBA Debug Part 2
In this video I talk about VBA Debug aspects like the Immediate Window, Local Window and Watch Window. …also we use the “debug.print” statement to print a value to the Immediate window. The Local Window is useful to view the current state of all the variables present in the current sub procedure. The Watch Window […]
How To Do A VBA CSV Import For One To Multiple Files
So you want to be able to import your csv for 1 to multiple files. Here’s how you do it. 1. up a form with a button. 2. After you click the button, you will get a File Dialog Box that will show you the csv files to choose from: Here is the code behind […]
How to get the images out of tblBinary
The custom ribbon uses the tblBinary to store images, but how do you get them out, if you want to use the nice images again for something else like a webpage toolbar? How to get the images out of tblBinary Well this code will loop the tblBinary table and save each image to the specified […]
Peoplesoft To SAP Migration Via Access
I received an interesting question yesterday from a potential customer. They are migrating all their Oracle PeopleSoft data to SAP. (They are exporting from PeopleSoft into Excel, importing it into Access to tweak it, and exporting to csv from Access to upload to SAP) Basically, how to take 1 (PeopleSoft) row and make it into […]
How To Do An Access Export To Excel In VBA
In this post, we are going to do an Access export to Excel, and you’ll see the VBA we’ll work with. This Excel automation will create a worksheet for each of our data points, and then enter the row items for that data point. We are going to let Access do most of the querying […]