Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get started with Visual Basic for Applications? [closed]

Tags:

vba

People also ask

How do I start Microsoft Visual Basic for Applications?

The easiest way to open the Visual Basic editor is to use the keyboard shortcut – ALT + F11 (hold the ALT key and press the F11 key). As soon as you do this, it will open a separate window for the Visual Basic editor.

How do I fix Microsoft Visual Basic for Applications?

From the Start screen, type Control Panel in the Search box, and then tap or click Apps. Tap or click Control Panel > Programs > Programs and Features. Select your Microsoft Office program, and then click Change. Select Online Repair, and then click Repair.

How do I start Visual Basic on my computer?

Open Visual Studio. On the start window, choose Create a new project. In the Create a new project window, choose Visual Basic from the Language list. Next, choose Windows from the Platform list and Console from the Project types list.

How do I enable Microsoft Visual Basic for Applications in VBA?

On the Database Tools tab, in the Macro group, click Visual Basic. In the Visual Basic Editor, on the Help menu, click Microsoft Visual Basic Help. In the Help window, click Access VBA Reference.


Jordan's answer is a fine one, but your problem runs deeper than whether or not you know VBA. Basically, you have rude coworkers and, if you hope to impress them, becoming a neophyte in an area in which they are highly skilled is unlikely to help.

The better way (IMO) to deal with this sort of thing is to tell the rude one "leave my office [/cubicle/whatever], now. No discussion", then have a word with his boss about how he interacts with his coworkers.

If his boss won't give you a satisfactory answer, take it up with HIS boss. Etc., until you get to the CEO, if that's what it takes.

If nobody up your chain of command thinks that the behaviour you describe from #2 programmer is a problem, the you have to consider whether or not the company you work for is worthy of your particular skill set.

And if you don't think you bring any particularly valuable skills to the company, then you probably shouldn't worry too much about whether or not the others respect you, although (a) you still shouldn't have to take the sort of abuse you describe and (b) your idea to extend your skills is admirable.

...But, if you're not a "natural born programmer", don't try to force your round peg into a square hole.

If it were me, I'd focus on being the kick-ass-est office admin anyone had ever seen. Oh, another tack: if #2's boss doesn't give you a satisfactory response, ask YOUR boss to take it up with him. Explain that you don't think that people should be subjected to that sort of behaviour in civilized society. Again, if he's not open to your complaint, you have to decide if you're going to work for that kind of company.

Good luck!

Leave us comments letting us know how it comes out.


VBA stands for Visual Basic for Applications. I recommend reading the Wikipedia article on it, then checking out some video tutorials like this one. I also like the "For Dummies" series when you want to learn about something you've never touched before. When you have specific questions, you can post them on this site.


If you get reasonably proficient with VBA, you won't have to call IT for these matters. That may be against your company's policy, but I'll leave that ethical dilemma to you. If I wanted to learn VBA, I would study these three books in order

VBA for Excel for Dummies (Walkenbach)
Power Programming for Excel VBA (Walkenbach)
Professional Excel Development (Bullen, Bovey, et al)

Concurrent with that study, you need to start solving real-world problems. Go to social.msdn.microsoft.com and start reading the VBA forums. Answer whatever questions you can. The ones you can't, wait for someone else to answer it then reproduce the problem and solution so you know it. Do the same with stackoverflow questions by following the vba tags. If any question seems too complicated, just skip and go to the next one.

Read Excel VBA blogs http://www.dailydoseofexcel.com/dicks-blogroll/ Start with http://datapigtechnologies.com/blog/ and http://blog.contextures.com/ for sure. They're not just VBA, but they're very well written.

Here's what will happen: In 3-6 months you will have discovered a whole new world. You will have written simple macros for yourself and your coworkers that eliminates some of the drudgery from your day. You'll start looking for wasteful process you can eliminate with simple code. In 6-12 months you will have become reasonably proficient. You won't need IT to fix minor problems for you. You will be the go-to Excel person in your office (learning VBA will make you better at Excel). You will have helped thousands of people here and on the msdn forums all while helping yourself.

After 2 years you'll probably start being recognized by MS and the community as an expert. You'll get sick of answering the same questions over and over on the forums so you'll start a blog and direct people there. You'll have arguments with your husband about whether VBA is a "real" language, but he'll be secretly proud of you for what you've accomplished. After 5 years you'll have co-authored an Excel book, quit your job to be an Excel consultant, and learned C#. YMMV of course.


VBA (Visual Basic for Application) is what you are looking at, incase you are interested in macros...

In my opinion it is far more easier to understand if you have good experience in Ms-Office, though for mastering it, you might need some programming skills.

The easy way to learn is start with a problem. Take a problem in hand and try to record the macro for automating your task... Then you can take a look at what got recorded in the Visual Basic Editor of the Ms-Office Suite...

Try to read and understand each line of code that got generated as a response to your actions... At first everything will be greek and latin... But if you continue to do it, you will easily understand it in no time...

Then you can search for materials and all those search results will be of great meaning to you.

Have a nice time..


Actually I started out programming by recording macrosin Excel and reviewing the code created by the recorder. Figure out a simple task and then record a macro. Recording macros in Excel 2007 can be found under the view tab under the Macros button on the far right. One of my first tasks I figured out was to filter several rows of data with autofilter then print the filtered section. After printing I remove the filter and select cell A1.

Before recording a macro figure out each click of the mouse in order. Everytime you click or type the macro records it. So reduce the chatter code recorded, by rehearsing the macro. You might even write out, by hand, a play script like in broadway play would have . Don't worry about how long it takes to record. The recorder has no concept of time. To best understand the VBA, record the macro several times. Throw in an extra click and see what it does. Compare the code in each macro. To get to the code view the macro with the same button mentioned above. select the macro and edit it. When you feel adventerous modify the code in the editor. ALWAYS record and play around on a copy a document not the real thing. This way you can delete the file if it gets to messed up. FYI - the stop button for the macro is often in the bottom left corner of the Excel window.

Happy learning, --J Man