"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
1 members and 324 guests
Simon Lloyd
Most users ever online was 905, 6th June 2012 at 17:26.
» Stats
Members: 28,342
Threads: 187,243
Posts: 737,656
Top Poster: Simon Lloyd (11,239)
Welcome to our newest member, Mtoth04
» 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
Range Only Populating with One Cell from Another...
_Mordred_
24th May 2013 20:19
Microsoft Excel Forum
update links vba
Theyman
24th May 2013 14:18
Microsoft Excel Forum
Summary of resources used in...
nils einar
Yesterday 15:21
Microsoft Project Forum
highlight cells during certain times
Brando
20th May 2013 17:53
Microsoft Excel Forum
Excel File Save (just macros and functions)
nalgene5622
11th May 2013 19:42
Microsoft Excel Forum
Shape(Index)
facetious
30th April 2013 22:49
Microsoft Publisher Forum
Populate table with text found between bookmarks
micannche
21st May 2013 20:11
Microsoft Word Forum
Minimize userform AND minimize excel instance
MWhiteDesigns
24th May 2013 15:40
Microsoft Excel Forum
Looking for a CountIF or SumIF formula
kdestef1
23rd May 2013 23:25
Microsoft Access Forum
Pull values from closed workbook using list index
MWhiteDesigns
24th May 2013 13:55
Microsoft Excel Forum
VBA Pivot table; Report Filter issue
MWhiteDesigns
20th May 2013 16:12
Microsoft Excel Forum
replace vlookup with vba
john55
24th May 2013 09:58
Microsoft Excel Forum
Help with dates
thorein
24th May 2013 07:00
Microsoft Project Forum
SUM formula glitch - Has Anyone Ever Seen This????
kdestef1
10th May 2013 20:14
Microsoft Excel Forum
VBA for Excel 2010 - Identify Blank Cells
hudu2468
20th May 2013 14:09
Microsoft Excel Forum
Copy and Paste Values at Logon
streub
23rd May 2013 14:53
Microsoft Excel Forum
calculate missing days
mwvirk
16th May 2013 12:34
Microsoft Excel Forum
Set Permissions via vba / dao
JezPerth
26th April 2013 05:22
Microsoft Access Forum
locked previous rows if user click on specifiec...
bittu2010
17th March 2013 15:04
Microsoft Excel Forum
RE: Remove spaces
QB
27th May 2010 21:30
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 02:05.


Thanks to vBET 3.6.3 you can enjoy automatic translations
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