+ Reply to Thread
Results 1 to 5 of 5

How do I start learning VBA/Macro

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    LA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile How do I start learning VBA/Macro

    Dear everyone,

    I have a few classes on C/ C++/ Java. Where could I find the online resources to learn VBA/Marco. I've tried to research online. But those I've found do not have the steps by steps for the coding syntax, library functions...etc.. Your input will be greatly appreciated.

    Thanks,

    astonric

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How do I start learning VBA/Macro

    Hi,

    You've made the right start by visiting this forum. Why not follow a few threads and see the answers that are given.

    The easiest way to see the correct syntax for VBA code is to use the macro recorder. That's the fallback for most of us when we're unsure. Be aware however that whilst this will show you the correct syntax, it is quite bloated code. It will always list all parameters with their default settings for particular actions and if the default settings are what you actually want you can delete them.

    The recorder also performs a lots of .Select and .Activate events for cells and sheets which are rarely needed. You can generally cut out these commands which only slow things down. e.g. if you record the actions to copy a cell and paste it somewhere else you'll record code like

    Please Login or Register  to view this content.
    This can be cut down to

    Please Login or Register  to view this content.
    And of course you can't use the macro recorder to build in logic like If..Then tests or Do..While loops etc. You'll need to study examples to pick up this sort of stuff.

    There are of course many books on the bookshelves which explain the principles of VBA and macros.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: How do I start learning VBA/Macro

    I was in your shoes few months back.
    I started with googling "how to write my first excel macro" (without quotes).
    Next, I started with simple exercises / problems, and searching their solutions on google.
    e.g. How to select a text ("aeroplane") in a range of cells (cells A1 to B32); how to find last used row on a sheet, how to copy data from one cell to another, etc.

    hth
    Ajay

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How do I start learning VBA/Macro

    I think one of the major requirements is a solid understanding of basic excel before attempting VBA
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: How do I start learning VBA/Macro

    The two factors which have most helped me in learning Excel macros have been:

    1. A number of ball-achingly dull jobs to do involving large quantities of data.
    2. Being extremely lazy.

    These factors have meant that when I've been faced with anything that (a) looks like real work and (b) isn't very exciting I've been motivated to find an easy way to do it.

    I started learning Excel macros (back before nice, easy VBA became the macro language) because I had two spreadsheets of consecutive years, each listing all of the products of a major multinational manufacturer and I had a week to find all of the differences between them.

    If you're not lucky enough to get a steady supply of dull data processing jobs then I'd suggest you try solving some of the problems that people post here and see how you get on. Don't be worried if your solutions are vastly different to the ones posted, as there are at least 114 ways to solve any given Excel problem.

    I'm afraid I can't offer you any advice on cultivating laziness - it's one of those skills that you either have or you don't.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1