Extreme Newbie Info. Requested

Harley78

Active Member
Joined
Sep 27, 2007
Messages
372
Office Version
  1. 365
Platform
  1. Windows
I have a friend ( LMAO ), who knows nothing about the VBA Code, definitions, Starting out. etc. and was wondering what book and or books you would recommend to my friend (lol) about understanding the meaning of the programming language...e.g. dim what is it? and why use it? etc.... see, a starting out book so one can understand the extreme basics. In a nutshell, someone that does not have any knowledge of anything about the programming language.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Re: Truly Beginners Help Info

Tell your friend to look at www.mrexcel.com. Bill Jelen (aka Mr Excel) has a VB book or two, and John Walkenbach (www.j-walk.com) is excellent as well.

In the meantime, one of the best VBA resources is VBA itself, with the macro recorder, which is your friend, and the VB helpfile.

e.g. for Dim look up "Declaring variables", and to figure out what kind of variables you have to play with look up "data types".

In short declaring variables (Dim is the keyword that tells VBA that you're declaring a variable) is good programming practice because you are pre-defining that element. Otherwise VBA has to try to figure out the best thing for your variable at run time, which can slow your code down. It's also an excellent way to catch errors.

E.G. Dim MyName as String
MyName = "Smitty"

I can refer to MyName anywhere in my code, but if I want to change it, I only have to change "Smitty" once, as opposed to trying to find each occurrence of it in my code. Making the change to the variable reference sets the change for all of them.

And don't forget to tell your friend (nudge, nudge, wink, wink) to always ask questions here! ;) That's what the board's for!

Smitty
 
Upvote 0
Re: Truly Beginners Help Info

Yes, I agree, this is the best place and have asked questions and recieved help.... but feel bad about asking all the time. In regards to the Dim state as an example, that's what my friend ( wink wink ) is exactly wanting to know about those shortcut statements and how to use them.

Thanks for the valuable input
 
Upvote 0
Re: Truly Beginners Help Info

In short declaring variables (Dim is the keyword that tells VBA that you're declaring a variable) is good programming practice because you are pre-defining that element. Otherwise VBA has to try to figure out the best thing for your variable at run time, which can slow your code down. It's also an excellent way to catch errors.

It's also a great way to avoid having to remember each and every variable (and get it typed correctly). Every declared variable appears in the Intellisense Drop-Down menu. Type the first letter or two of a declared variable, and then press Ctrl+Space, to activate the Intellisense Drop-Down, and you get presented with a list of possible matches...
 
Upvote 0
Re: Truly Beginners Help Info

e.g. for Dim look up "Declaring variables", and to figure out what kind of variables you have to play with look up "data types"...In short declaring variables (Dim is the keyword that tells VBA that you're declaring a variable) ...

We'd have to ask Joe W. or Aladin or someone even older than myself. But as I recall DIM was short for DIMension because in the early days you had to size your arrays up front. So we'd code
Code:
Dim MyArray(100) as Integer
It's been a really, really long time, but I don't remember having to declare other variables before compile time (not in BASIC). But it could be that my memory has faded too much.

Oh, yeah, back on topic... Bill's books and Walkenbach's are the way to go. Though I've also found MS Press' Step by Step books pretty good for when your just startin' out in something.
 
Upvote 0
Re: Truly Beginners Help Info

VBA is a pretty nifty tool, although I would suggest that a more "traditional" basic language could be a better learning experience to learn how to declare variables, creating different kinds of loops, performing functions, getting user input, etc.

I've often thought that VBA and the other MS programming tools are great for experienced coders, but the learning curve resembles a stroll up the side of Mt. Everest!

DarkBasic has some nice features and excellent tutorials for the absolute beginner. It's older but BlitzBasic is kind of nice too. Seem to recall it being re-released on PC a while back. If you have access to a copy, MS-DOS 6 used to ship with QBasic which was a fairly traditional interpreter/editor and is good for beginners too. Showing my age with these suggestions. I learned to program on the C64 & Spectrum 48k!

Microsoft also (don't know if it's still available) gave away a near-full version of visual studio for VB/.NET (and other languages) that was more intended for learners... But it's still unfriendly if you ask me.

If you would rather go to VBA directly; then I'd just experiment with the macro recorder as described above.
 
Upvote 0

Forum statistics

Threads
1,225,360
Messages
6,184,508
Members
453,237
Latest member
lordleo

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