+ Reply to Thread
Results 1 to 4 of 4

Can I run Visual Basic procedure using Excel Visual Basic editor?

  1. #1
    john.jacobs71
    Guest

    Can I run Visual Basic procedure using Excel Visual Basic editor?

    I am trying to build a very simple loop to compare columns of data in excel.
    I am not an experienced programmer but I am trying to learn enough to write
    this code. The problem is, none of the examples in online tutorials match
    the software menu options in the Visual Basic Editor I open through the
    tools/macro submenu. For example, the tutorial may recommend opening the
    file menu and selecting new program, but in the tutorial this option does not
    even exist. Furthermore, any code I have attempted to write, even when it is
    directly copied from very basic examples, crashes from syntax errors. Are
    there tutorials that match the Excel module of VB so that I can get started??


  2. #2
    Norman Jones
    Guest

    Re: Can I run Visual Basic procedure using Excel Visual Basic editor?

    Hi John,

    You may wish to visit David McRitchie's 'Getting Started With Macros And
    User Defined Functions' at:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm


    You might also look at David's tutorials page at:

    http://www.mvps.org/dmcritchie/excel....htm#tutorials

    The VBA material is towards the end of that section.


    ---
    Regards,
    Norman


    "john.jacobs71" <johnjacobs71@discussions.microsoft.com> wrote in message
    news:959E6E8D-D567-42A5-A776-1C8977499FEC@microsoft.com...
    >I am trying to build a very simple loop to compare columns of data in
    >excel.
    > I am not an experienced programmer but I am trying to learn enough to
    > write
    > this code. The problem is, none of the examples in online tutorials match
    > the software menu options in the Visual Basic Editor I open through the
    > tools/macro submenu. For example, the tutorial may recommend opening the
    > file menu and selecting new program, but in the tutorial this option does
    > not
    > even exist. Furthermore, any code I have attempted to write, even when it
    > is
    > directly copied from very basic examples, crashes from syntax errors. Are
    > there tutorials that match the Excel module of VB so that I can get
    > started??
    >




  3. #3
    Harald Staff
    Guest

    Re: Can I run Visual Basic procedure using Excel Visual Basic editor?

    Hi

    Your tutorials are probably for Visual Basic, which is a standalone
    programming suite where you can write standalone programs and other things,
    or they are for Visual Basic.Net , which is a newer version of the same.
    Excel and the rest of Office use a thing called Visual Basic for
    Applications (aka VBA). VBA is mostly used to program and control the Office
    applications, so the user interface and the available objects are different.

    Languages are either the same (VB and VBA) or pretty similar (VB.Net) so
    once you learn the basics, you can implement any code in any of these
    applications. Excel is a great place to start programming, but I'd recommend
    an Excel programming book for a start:
    http://www.j-walk.com/ss/books/bookxl27.htm

    HTH. Best wishes Harald

    "john.jacobs71" <johnjacobs71@discussions.microsoft.com> skrev i melding
    news:959E6E8D-D567-42A5-A776-1C8977499FEC@microsoft.com...
    > I am trying to build a very simple loop to compare columns of data in

    excel.
    > I am not an experienced programmer but I am trying to learn enough to

    write
    > this code. The problem is, none of the examples in online tutorials match
    > the software menu options in the Visual Basic Editor I open through the
    > tools/macro submenu. For example, the tutorial may recommend opening the
    > file menu and selecting new program, but in the tutorial this option does

    not
    > even exist. Furthermore, any code I have attempted to write, even when it

    is
    > directly copied from very basic examples, crashes from syntax errors. Are
    > there tutorials that match the Excel module of VB so that I can get

    started??
    >




  4. #4
    Rob
    Guest

    RE: Can I run Visual Basic procedure using Excel Visual Basic editor?

    Hi John,

    I don't have the knowledge to explain why you have so much trouble with
    "crashes from syntax errors", but maybe if you quote a specific example
    someone can help pinpoint the problem quicker.Just out of curiousity, have
    you tried recording your actions using the macro recorder (excel - tools -
    macro - record new macro) & then modifying the resulting code in the VBE?
    I'm just learning what Excel can do myself, but I strongly believe that one
    of the best ways to learn is to look at examples (eg Google "compare lists"
    or "find/count/list duplicates" etc) & modify/copy the info - whether it's
    macro or formula based.
    A couple of pages I have found useful for techniques to use when comparing
    columns of data are:
    http://www.mvps.org/dmcritchie/excel/duplicates.htm
    http://www.cpearson.com/excel/duplicat.htm (a link on above page)
    NB, Dave Hawley (among others, is very wary of using loops), eg
    http://www.ozgrid.com/VBA/VBALoops.htm

    hth,
    regards
    Rob

    "john.jacobs71" wrote:

    > I am trying to build a very simple loop to compare columns of data in excel.
    > I am not an experienced programmer but I am trying to learn enough to write
    > this code. The problem is, none of the examples in online tutorials match
    > the software menu options in the Visual Basic Editor I open through the
    > tools/macro submenu. For example, the tutorial may recommend opening the
    > file menu and selecting new program, but in the tutorial this option does not
    > even exist. Furthermore, any code I have attempted to write, even when it is
    > directly copied from very basic examples, crashes from syntax errors. Are
    > there tutorials that match the Excel module of VB so that I can get started??
    >


+ 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