Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Learning Visual Basic using Excel

Status
Not open for further replies.

jepro

Programmer
Aug 5, 2003
1
0
0
GB
I’ve been programming in Delphi for a few years now but would like to learn Visual Basic. Unfortunately I currently don’t have access to a complete VB package, but I do have access to Microsoft Excel 2002, I would therefore like to learn using it. Could someone perhaps give me some tips as what would my best approach be to start learning the VB using Excel.
 
The dirty way....


turn on the macro recorder....execute a screen or formula operation on a a sheet,...stop the recorder.


Alt+F11 to view the code that Excel generated.


You can see where you can splice in conditionals, loops ...etc as you get more familiar.
 
A good way to start learning some of the vb syntax would be to record macro's. Record a macro and do different things throught excel. Moving information, openng up other files, inporting information,etc.Than go into the vb editor and look at the macro you made.
Visual basic is an object orientated language. Once you know the syntax a little it is very easy to pick up. Sure vb6 is a little different,and can do a lot more things than vba, but its a start.
 
jepro,

if you are used to Delphi, VBA will seem a little strange! I use Delphi and incorporate VBA into my Delphi code to manipulate Excel and it's even weirder through delphi!! But it is easy to get your head around.

Leslie
 
I highly recommend John Walkenbach's Excel 2002 Power Programming for VBA, I had never really programmed much of anything, I bought it, it's easily worth the $50, read it basically cover to cover, and now i'm getting pretty good with it. It also helps to learn it if you have something in mind that you'd like to improve, because if you know what you want, you'll be able to find out how to do it. It doesn't make a whole lot of sense until you try to do something with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top