New to the Programming world

VBA Newby

New Member
Joined
Sep 2, 2012
Messages
4
Hi

I have recently started to learn VBA for Excel as I have only come to understand the importance it holds in the workplace and the potential value I can personally gain as an employee. The question I had was the kind of experience you guys had when starting off. I was also going to ask for advice and recommendations, as I have acquired books such as Excel 2010: Power programming with VBA, Excel Formulas 2010, VBA for Dummies, and wish to know how to get the ball rolling. My understanding of Excel is intermediate/advanced intermediate, I can generally work my way around formulas including IF's and the LOOKUP's.

Thank you for your opinions and experience in advance
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi

I have recently started to learn VBA for Excel as I have only come to understand the importance it holds in the workplace and the potential value I can personally gain as an employee. The question I had was the kind of experience you guys had when starting off. I was also going to ask for advice and recommendations, as I have acquired books such as Excel 2010: Power programming with VBA, Excel Formulas 2010, VBA for Dummies, and wish to know how to get the ball rolling. My understanding of Excel is intermediate/advanced intermediate, I can generally work my way around formulas including IF's and the LOOKUP's.

Thank you for your opinions and experience in advance

In 1995 the transition began from Macro 4 to VBA. MS sent out a notice that they would shortly stop supporting Macro Sheets. All of our office programs for internal reports and graphs had been written in Macro Sheets and the author was long gone. Solution: Learn VB. It was painful then and since I am still learning, it is still painful at times. But I am retired now, so I can stand the pain a little better. There are on line tutorials, some free, some not. Local book stores carry paperback editions of VBA programmin and Excel Formula books written by some names that you might see on this site from time to time, either by reference or as one of the MVP contributors. I personally use the VBA help files a lot. My memory is not as good as the one in my computer. But there is a lot of useful information in the help files and once you get used to them, they are fairly easy to get around in. One thing I learned early on is that there is no single point of information that will give you the solution to every problem in programming. The main thing is to not give up, and to not be afraid of trying something to see if it will work instead of sitting and worndering if it will. The worse theing that can happen is that you will wipe out your hard drive or melt the mother board! (g)

Regards, JLG
 
Upvote 0
In addition to what the others have said.....
There are a number of ways to do things in VBA, some are faster / more efficient than others, and while really efficient is great, try to remember that you, as the writer, will need to understand the code at a later date, when it needs modifiying or updating.
Another thing to do is hang around this forum and check out some of the stuff that gets posted.
copy that code to your workbook and then fiddle with it to see what happens when you make changes, as you learn the little changes, your knowledge and confidence will grow. Once that happens you will be able to start replying to some of the posts .........and then you're on your way.

Good luck, and as JLG stated, don't give and don't be afraid to try stuff....:beerchug:
 
Upvote 0
I am obviously in the presence of competent and experienced individuals. Thank you gentlemen. The gist of it seems to be - learning from multiple sources - being confident and not being afraid to fiddle with pre-established codes - using this website. Thank you and this will be my new action plan. I thing I was unsure about was the 'help file'. Not sure if you can elaborate as to where these help files could be located.
 
Upvote 0
I am obviously in the presence of competent and experienced individuals. Thank you gentlemen. The gist of it seems to be - learning from multiple sources - being confident and not being afraid to fiddle with pre-established codes - using this website. Thank you and this will be my new action plan. I thing I was unsure about was the 'help file'. Not sure if you can elaborate as to where these help files could be located.
In the VB Editor, click "Help/Microsoft Visual Basic Help" on the menu bar which display three links that open up to the entire VB world. Also, if you see a function name (such as Replace), Or statement name (such as For) or Operator name (such as And), you can place the text cursor inside, or next to, that word and press F1 to get help on that particular keyword directly.
 
Upvote 0
In the VB Editor, click "Help/Microsoft Visual Basic Help" on the menu bar which display three links that open up to the entire VB world. Also, if you see a function name (such as Replace), Or statement name (such as For) or Operator name (such as And), you can place the text cursor inside, or next to, that word and press F1 to get help on that particular keyword directly.
And just to follow up regarding your original question...

I come to Excel from a different route than most... I really have never used Excel in a production setting; rather, I am a programmer who transplanted himself to the Excel when the programming language of choice disappeared. I originally learned to program in various "flavors" of BASIC, the old DOS programming language and then move to the compiled version of Visual Basic at its Version 2 release. I have also programmed in other languages along the way (FORTRAN, C/C++, UNIX scripts, etc.) and I am completely self-taught in all of them.

The method I use to learn a language is to read the documentation for all the functions, statements and operators there are... not to memorize their syntax (there is always the documentation for that), rather, to memorize what exists in the language and generally what it can be used for. It is not accidental that programming languages are called "languages"... like a language, the functions, statements and operators it possesses are like the words in a normal language and the code lines you create from them are like sentences in a normal language... once you know a word (function, statement, operator) exists, you can use it in a sentence (code line), but if you don't know the word exists, you are severely limited in the sentences you can construct.

Another thing I used to do when coming to a new language was to sit down and try and create a complex program in it (I used to create a slot machine program in my pre-Excel days). Why? Because I knew it almost nothing in the program I wrote would work. Why was that a good thing? Because it forced me to figure out why the various parts of the program didn't work. Frustrating... yes, but once I figured out why something I thought should work but didn't, I tended to remember if for the next time it came up in my coding. For me, the best teacher was to have something not work and figure out why. Of course, this technique may not work for everyone, but I found it extremely useful for bringing me up to speed in a new language. Oh, and don't think everything will gel quickly... it won't, but you are learning something new, so you will need to devote time to the task.
 
Upvote 0
Thank you for your experiences, they have been very motivating. I think the main aspect that motivates me is how you have had to understand each language on your own. Which I intend to do my self, but only VBA and not FORTRAN or C++. Again thanks and your feedback is most appreciated. Just to give you guys my plan.

I will read, whilst attempting to apply, the Excel formulas 2010 (By MrExcel himself). During this time, I am also intending to learning the VBA for Dummies book. When i believe my knowledge is at a stage where i can write codes quite comfortably, I will refer back to this website and attempt to solve problems as proposed by the users of this forum.

Fair plan?
 
Upvote 0
There's no reason to wait until you're comfortable writing code to post back to the forum. A lot of what I learned was from trolling the forum and trying out topics that interested me (or ones that I felt I had a handle on). I have posted a lot of less than perfect solutions, but it was nice to be able to look at how I approached the problem compared to other people. Just my $.02 at least.
 
Upvote 0
Welcome to the Board!

One of the easiest ways to start getting used to VBA is to record a repetitive task with which you're intimately familiar. That way, when you read the recorded code you'll be able to see what fits where based on your knowledge of the process. Don't be afraid to post recorded code if you've got a question about why/how it's doing something and if there are ways to clean it up (there almost always are).

Note that the recorder does nothing more than play back your actions, so it's non-deterministic, meaning that it can't think on its own. When you need to start getting dynamic, like automatically adjusting print ranges, that's where your VBA knowledge will really start kicking in. A lot of people will rely on the recorder to capture syntax that they'd otherwise have to look up, or if you're doing things like SaveAs with complicated file paths that can easily be mistyped.

The Macro Recorder is your friend, especially when you're just starting out.

HTH,
 
Upvote 0

Forum statistics

Threads
1,225,626
Messages
6,186,094
Members
453,337
Latest member
fiaz ahmad

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