What is VBA for?

dave_br

Board Regular
Joined
Aug 23, 2010
Messages
76
Forgive my ignorence guys, but it seems like VBA could be a great help to learning to use excel to a fuller level,

so....

what does/can it do?

waht is the best way to learn visual Basic? is it to go on a course or can it be self taught?

dave
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You will have a lot of people replying to your question once this starts you shuold have lots of responses.

Learn the initial VBA by recording MACROS in workbooks. Consider that you want to eleminate routine tasks or repetative tasks.

Then think about what you can't do with the front end side of Excel, like there maybe limited in the Functions side and you need specific ones for a business area.

This will be a place to start.

Attend a course, I would say yes as it gives you an understanding and then you grow from there. Good idea is to consider something that you would like to learn about. UserForms for interaction, as well as manipulation, interaction with automated applications etc.

It should be interesting to see further responses. Mine is just an initial basic concept.:)
 
Upvote 0
VBA stands for Visual Basic for Applications. It allows one to programatically control virtually all aspects of Excel. You can use VBA to automate tasks, format spreadsheets, e-mail to a list of people, and even control things outside of excel!

To have a bit better understanding of what it does, record a macro (Tools>Macro>Record Macro). Then go to the Visual Basic Editor (Alt+F11) and look at the code that the macro recorder made. This is VBA code.

I'd recommend taking an introductory course to VBA somewhere, or grabbing a VBA book (MrExcel has some that I am sure are good). Once you understand the basics, you can learn a LOT just by picking apart the code that the macro recorder creates.
 
Upvote 0
Most the courses on offer are 1 or 2 day courses, which if you have never used VBA before I would say are not very useful. (I found)

For me, what they did do is plant a seed to say ' wow - I never knew you could do that! '.

Then you come back to your day job & start to play around with basic code to replace some meanial tasks you currently do. The more you play, the more you discover.

If like me you work somewhere where Excel is not a strong point for most people, to be able to develop some macro's that save departments hours of work each month makes you look quite impressive.

John Walkenbach does some pretty good Excel/VBA books

Finally - ask questions on this site. The knowledge from the guys here is invaluable! I have been working with VBA for about 2yrs & have barely scratched the surface in comparison.
 
Upvote 0
I would definitely recommend a foundation course or a book that focuses more on pure VBA to start with (the basic control structures, loops etc) so that you have a solid understanding of that before you start to apply it to Excel (or any other app).
However, it's also important to have a thorough understanding of the application you are automating since there are usually multiple ways to achieve anything in VBA and often replicating what you would do manually is the most efficient - e.g. applying a filter and deleting visible rows, rather than looping through each row, testing a condition and then deleting it if applicable.
 
Upvote 0
what does/can it do?
It allows you to manipulate the workbook to a much finer degree than mere worksheet formulae allow. It also allows you to connect your worksheet to Access databases, Word documents, Outlook (for handling mail, appointments, etc), interact with the user, obtain information about the machine environment (user's name, network information, Windows registry), and lots more.

GIYF!
 
Upvote 0
It allows you to manipulate the workbook to a much finer degree than mere worksheet formulae allow. It also allows you to connect your worksheet to Access databases, Word documents, Outlook (for handling mail, appointments, etc), interact with the user, obtain information about the machine environment (user's name, network information, Windows registry), and lots more.

GIYF!

It can even be used to open up your DVD drive. ;) (That's a fun little prank I like to play on coworkers from time to time)
 
Upvote 0
Accompanied by:-
Code:
[FONT=Courier New]MsgBox "You have used your allocation of Internet time." & vbCrLf & vbCrLf & _[/FONT]
[FONT=Courier New]       "Please insert your credit card to continue..."[/FONT]
:)
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top