Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm confident coding in C# & Java, but have never gotten around to writing macro's in Excel.

I was wondering if anyone could point me in the right direction for some NON-beginner cheat sheets for coding excel macros?

I guess i am looking for things like syntax guide, commonly used functions, best practices. The more concise the better!

David

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Well, for a start, I think a generic VB syntax sheet would be useful. After all VBA is just a stripped down Visual Basic (more similar to VB6 than VB.NET, so no LINQ queries on your cells!) with the Office object model. I really like this C# to/from VB.NET sheet. And since people rarely use VBA to develop complex classes, once you're familiar with the basics (subs, variables, loops, branching) it's pretty much standard programming from then on.

As for the object model, if you're familiar with the .NET documentation, you'll find that the VBA/excel help is structured similarly (with lists of methods and properties for each object). Things usually start to go smoothly once you're familiar with the essential objects:

  • Excel.Application
  • Excel.Workbook
  • Excel.Worksheet
  • Excel.Range

I've looked for a few visually structured documents, like this, this and that (caution: from old excel version), but they appear very mildly useful. There may be some gems out there, but problem-specific google searches usually works pretty well.

share|improve this answer
    
thanks for the links at the bottom, they were useful, –  GreyCloud Jan 30 '12 at 14:24
    
i'd still be interested in a syntax guide to VBA though –  GreyCloud Jan 30 '12 at 14:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.