• Subscribe
  • Submit an Article
  • Submit a Link
  • Home
  • Advertise
  • Links
  • Contact
  • About
Situation:You want to get a user input and you want to know if the entered data is a number or notSolution:Make a subroutine with “GetInput” name (you can use any name you desire) and inside it use the InputBox function of the Excel VBA programming language. A variable (vInput) should get the entered value and use the function IsNumeric to check if the value is a number or not. The input box looks like this:Source Cod...
Read More
Posted by Catholic Prayers on Tuesday, July 31, 2007
Comments are pretty useful to the programmer for a couple of reasons:1.) It is a reminder of the structure of the programmer.2.) It is a reminder of pending tasks in a specific part of the program.To add a comment to your code, put a single quote mark (‘) at the beginning of the sentence. VBA ignores everything that is written in this line.Exampl...
Read More
Posted by Catholic Prayers on
So you just typed in your first source code and you want to run it to test how it works. When you press F5 key, Visual Basic runs the code starting from the first line of the procedure in which the cursor is placed. Pressing F5 is equivalent to clicking Run Sub on the Run menu in Visual Basic Edito...
Read More
Posted by Catholic Prayers on
Situation:You need to create module procedures to start your programming. You want two procedures to display the phrase “Hello World!” on the screen.Solution:There are three types of procedures in Excel VBA: Sub, Function and Property. A Sub procedure performs actions but doesn’t return a value; a Function procedure, however, returns a value. The Property procedure is a type of procedure used in Class module. I will only give example of...
Read More
Posted by Catholic Prayers on
Situation:You want to make an Excel VBA program and you don’t know how to run the Excel VBA Editor.Solution:On the Excel main menu, click Tools>Macro>Visual Basic Editor or simply press Alt-F11.To open a blank code module in the editor, click Module on the Insert men...
Read More
Posted by Catholic Prayers on
Microsoft Excel has a Macro Recorder that lets you record workbook tasks and can help you to quickly learn macro programming. To run the Macro Recorder, click Tools>Macro>Macro Recorder from the menu. Please figure below.Situation:Regularly, you find yourself searching the value 1,000 in column A together with other tasks and you want a program routine to automate the search.Solution:1.) Run the Macro Recorder.2.) Select the whole...
Read More
Posted by Catholic Prayers on Saturday, July 21, 2007
This blog is all about Microsoft Excel Visual Basic for Application. Excel has been around for more than a decade and many businesses have used it as a tool to do business and financial computation. During my 5 years of Excel macro programming, I have seen companies that have problems in customizing their Excel workbooks and they came to me for consultation. This blog covers knowledge I gained during those years. My objective is to help those who are looking for ideas or sample codes to complete their programming tasks.I am...
Read More
Posted by Catholic Prayers on Friday, July 20, 2007
As I was doing some research for what kind of information the internet has about Excel and VBA, I have learned that many websites have already been giving the kind of information that I had in mind when I started this weblog. This is a little bit frustrating, nevertheless challenging to come up with a niche of my own. I have decided to narrow down my objectives to provide specific example of business solutions using Excel and/or Excel VBA. In my future articles, I will be posting basic Excel and VBA functions, and some articles...
Read More
Posted by Catholic Prayers on

Followers