Link to home
Start Free TrialLog in
Avatar of JKCC
JKCCFlag for Australia

asked on

VBA, Dim, Module, Objects etc...


Hi Experts,

As you can tell I'm asking very basic questions because I have recently started to expand my excel knowledge by using VBA. I have no programming background at all and have started to use the macro recorder, adjust other's code to suit my needs or have had much help with excellent code written specifically for me which I have applied but also want to understand it better.

Can someone please explain to me about Dim, modules and objects. I have seem some code written without any Dim statements at the beginning and others which have it. I want to further my understanding so that I now when it needs to be applied and when it doesn't. Also, why are some macros written under the specific sheets e.g. sheet1 and others under modules? Does it matter and is a private module only for that specific worksheet or the whole workbook etc? Also, are worksheets and ranges objects?

Can you recommend a good book or website that puts it in simple words, but has samples of vba that might be used everyday in an office environment? Sorry, for the many questions and hopefully this type of question is allowed to be posted on here. It's not a programming type question, but I figure as your the expert its probably best to ask here because I don't know anyone personally.

Thankyou in advance!
SOLUTION
Avatar of z_alex
z_alex

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of JP
JP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JKCC

ASKER

So many responses and different bits of information....thankyou for the tips all and for the detailed response too Qlemo....

Cheers all!