PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?am9obi5qYWNvYnM3MQ==?=
Guest
Posts: n/a
 
      26th Dec 2005
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 With Quote
 
 
 
 
Norman Jones
Guest
Posts: n/a
 
      26th Dec 2005
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" <(E-Mail Removed)> wrote in message
news:959E6E8D-D567-42A5-A776-(E-Mail Removed)...
>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 With Quote
 
Harald Staff
Guest
Posts: n/a
 
      26th Dec 2005
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" <(E-Mail Removed)> skrev i melding
news:959E6E8D-D567-42A5-A776-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?Um9i?=
Guest
Posts: n/a
 
      26th Dec 2005
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Visual Basic Editor John Microsoft Excel Programming 4 11th Jan 2009 05:57 PM
pLeAsE hELp! format function in excel visual basic editor Alpineman2 Microsoft Excel Programming 4 2nd Dec 2007 01:19 AM
please help : Excel visual basic editor AMIT Microsoft Excel Programming 2 16th Mar 2007 08:01 PM
Visual Basic Editor for Excel =?Utf-8?B?Sm9lQUJD?= Microsoft Excel Discussion 1 12th Aug 2005 03:59 AM
Visual Basic editor terminates Excel 2003 =?Utf-8?B?SmltIFplZWI=?= Microsoft Excel Programming 3 30th Jan 2004 08:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:03 AM.