"Excel VBA Help"

 


To stop seeing these ads and get other benefits check This page!
Automatic Translations (Powered by Powered by Google )
Catalan Chinese Croatian Czech Danish Dutch English Finnish French Galician German Greek Hindi Indonesian Italian Japanese Korean Latvian Lithuanian Norwegian Persian Polish Portuguese Romanian Serbian Slovak Slovenian Spanish Swedish Thai Turkish Ukrainian Vietnamese
Page showing the last 10:-
The Code Cage - Microsoft Office help


» Online Users: 325
0 members and 325 guests
No Members online
Most users ever online was 905, 6th June 2012 at 17:26.
» Stats
Members: 28,257
Threads: 187,224
Posts: 737,508
Top Poster: Simon Lloyd (11,224)
Welcome to our newest member, eddiezeiter
» Sponsored Links
Sponsored Links

Contact Us to Advertise here!

» Tutorial Library

VBA Starters:


Courtesy of Craig Hatmaker

Intro to VBA


Why VBA?


VBA allows us to:
· Automate repetitive tasks – Ex. Creating daily charts
· Enforce standards on tasks – Ex. Making sure journal entries balance before posting
· Simplify complex tasks – Ex. Creating user defined functions to replace long, convoluted formulas
· Perform tasks that would be otherwise impossible – Ex. Posting data to external databases

What is VBA?

VBA stands for Visual Basic for Applications. VBA is known as the “Macro” language for Microsoft’s (and others’)

Office applications (aka “Host Applications”). Even though VBA is found in many different applications (Excel, Outlook, Access, Word, Visio, and others), the things that make up this computer language such as Functions,
Variable Types, Operators, and Branching and Looping are the same in all of them:

Functions
Just like Excel, VBA has a rich functions library. Some are exclusive to VBA. Many are

similar to Excel. For example, Excel’s Absolute Value function is ABS(). So is VBA’s.
Variable Types
Variables are like Excel’s cells – they hold values that can be read or changed. Unlike
Excel’s cells, variables must be of certain types that determine what the variable can
hold. Two common variable types are:

Integer Holds small whole numbers for use in math operations
String Holds anything you can type but won’t use in math operations.

Operators
Just like Excel, VBA has a rich set of operators such as:
Comparison Operators
=, >, <
Arithmetic Operators
+, -, *, /

Branching and Looping
This differentiates Excel from a procedural language like VBA. Branching and looping
are why VBA is a strong complement to Excel. The procedural elements of VBA are:
If/Then/Else Statements
Used to conditionally run specific sections of VBA code
Select Case statements Similar to If/Then/Else, Select Case statements run specific sections of VBA code based on an a single expression that can have multiple values.

1 Wiki on VBA:

http://en.wikipedia.org/wiki/Visual_Basic_for_Applications
2 Wiki on Macro:

http://en.wikipedia.org/wiki/Macro
3 MSDN on VBA’s functions:

http://msdn.microsoft.com/en-us/library/gg278941.aspx
4 Wiki on Procedural Programming:

http://en.wikipedia.org/wiki/Procedural_programming_languages

For Each, For Next Loops Used for repeating sections of VBA code a set number of times
Do, Do While, Do Until, Loops Used for conditionally repeating sections of VBA code

As you can see, VBA is similar is some respects to Excel, so leaning VBA isn’t that difficult for Excel’s users. And once you’ve leaned VBA, you can use it to add automation to many different applications without having to learn different languages.


Questions asked on Excel VBA by our members




.....Read More (entire tutorial!)
» Recent Threads
Title, Username, & Date Forum
Questions regarding Countifs in VBA code and...
streub
Yesterday 20:51
Microsoft Excel Forum
msgbox every day
john55
10th May 2013 08:14
Microsoft Outlook Forum
Macros required solve three issues...
acsishere
17th May 2013 20:15
Microsoft Excel Forum
calculate missing days
mwvirk
16th May 2013 12:34
Microsoft Excel Forum
Paste Special Errors while copying from Excel to...
Katarot
3rd May 2013 09:50
Microsoft Excel Forum
routine to execute only once per day
streub
17th May 2013 17:44
Microsoft Excel Forum
Select Autofilter Criteria date range using two...
MWhiteDesigns
16th May 2013 20:37
Microsoft Excel Forum
How to get a total to show up at the bottom row...
hudu2468
16th May 2013 15:30
Microsoft Access Forum
(conditional formatting) based on a formula in...
marreco
11th May 2013 01:16
Microsoft Excel Forum
RE: Remove spaces
QB
27th May 2010 21:30
Microsoft Excel Forum
SUM formula glitch - Has Anyone Ever Seen This????
kdestef1
10th May 2013 20:14
Microsoft Excel Forum
Tables and Forms
JEHalm
14th May 2013 21:34
Microsoft Access Forum
Runtime error 13: Type Mismatch
MWhiteDesigns
16th May 2013 16:33
Microsoft Excel Forum
Exporting Table To txt file
hudu2468
16th May 2013 15:36
Microsoft Access Forum
Vlookup with multiple Columns
bvsramesh
15th May 2013 15:44
Microsoft Excel Forum
Paste Special VBA
MWhiteDesigns
15th May 2013 13:57
Microsoft Excel Forum
Use Date range; Sum cells using 3 criteria, paste...
MWhiteDesigns
13th May 2013 16:18
Microsoft Excel Forum
Sort Rows Alphabetically based on text in a...
Brando
14th May 2013 17:56
Microsoft Excel Forum
VBA IF statement depending on time
apandbp
13th May 2013 21:45
Microsoft Excel Forum
Userform and sheet activation
streub
10th May 2013 22:55
Microsoft Excel Forum
» News
Excel verses Access
Apr 29, 2013 - 3:27 PM - by streub
I have an Excel workbook used for tracking our daily sales. Some of the other features are comparing sales figures to budget, tracking individual sales, analyzing statistical data and charts and graphs. There are also a number of userforms... [Read More]
Has anyone developed an App for iPhone?
Apr 22, 2013 - 6:18 PM - by MWhiteDesigns
I am looking into developing my first app for iphone. I understand this project will take a while. iOS seems to be based of C++.

Has anyone developed an APp for iPhone? If so, can you give any tips or pointers? Are there any forums... [Read More]
Transposing Nth Exponents
Apr 21, 2013 - 4:16 AM - by _Mordred_
Hi all, I have a problem that is math orientated and Google is not answering my query about transposing exponents. I have a linear set of equations and I'm trying to isolate t in the equation t^4 = (3.25*10-5)k^-1. Does t = the fourth root of... [Read More]
3D Analytic Tool for Excel 2013
Apr 11, 2013 - 2:45 PM - by _Mordred_
Have any of you seen the new 3D analytics tool for Excel 2013? I think it's impressive and may consider re-installing 13 on my laptop just to give it a go. You can view it ... [Read More]
Excel - Create a chart with one button press
Mar 29, 2013 - 5:11 PM - by Simon Lloyd
Top Tip
Submitted By: Simon Lloyd
... [Read More]
» The Code Cage Ranking
Page Rank Check
Visitors To This Page
Powered by vBadvanced CMPS v3.1.0
The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!


http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 05:28.


Translated to other languages supported by vBET Translator 3.6.3
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
SEO by vBSEO
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright © Simon Lloyd 2008 - 2013
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1