1. Home
  2. Computing & Technology
  3. Visual Basic

VBA Macro Coding for Word 2007

VB6 Lives!

VBA is still the best coding environment for Microsoft Office. (And, yes, I know about VSTO.) Learn how to use it with Word 2007!

Further Reading

Learn WPF and XAML

In case you haven't heard, Windows Forms is going away ... someday. All of the hot, new stuff is written in WPF and XAML. About Visual Basic has an easy-to-read introduction to WPF, and a collection of supporting articles too!

More on WPF and XAML with VB.NET

Dan's Visual Basic Blog

CodeRush Express

Friday March 12, 2010

A Third Party VB.NET Productivity Tool

Microsoft is promoting a third party product on their site these days called "CodeRush Express". If you just read the headlines, you might think that it's totally free like VB.NET Express is.

Not quite.

It's totally free if you have a paid version of Visual Studio. (That is, it won't load in VB.NET Express.) So you have to pay for something. This makes Microsoft's willingness to promote it on their site a little more understandable. And, much like VB.NET Express, you can buy versions with more power. But like VB.Net Express, the free version is pretty cool and you can get a lot without paying for it. (It's interesting to note that the current utility - available for both VB.NET and C#.NET - was developed originally only for VB.NET.)

CodeRush Express is available from a very innovative company called DevExpress. It's much like Intellisense on Steriods ... in both the positive and negative sense. Let me explain.

Intellisense suggests the ways you can complete a partial statement so you don't have to memorize the (literally) thousands and thousands of methods and properties. If you declare a TextBox as "myTextBox" and type "myTextBox." then Intellisense will give you a list of all of the properties and methods that are possible to select from.

CodeRush Express goes a step beyond. Using a special keystroke, you can get Visual Studio to completely recode the statement based on a partial statement that you enter. In their video at http://tv.devexpress.com/CodeRushXpressVBIntro.movie, for example, the presenter types in the partial statement ...

Assembly.GetExecutingAssembly()

... and CodeRush Express suggests the complete statement ...

Dim GetExecutingAssembly1 as Assembly = Assembly.GetExecutingAssembly()

The bottom line effect is a little like a different way of using the standard Microsoft Visual Studio productivity component, Snippets. You can right-click somewhere in your code and Visual Studio (including the VB.NET Express version) will give you a layered menu of selections of code that you might want to add to your source, including replaceable placeholders for parts of it. In other words, a Snippet might include a replaceable "Query" placeholder. You would code the unique query that applies to your application.

So CodeRush Express "bulks up" your development environment with extra muscle that you may, or may not, need. Like a steriod shot.

The problem might be compared to a steroid shot too. Third party tools like this can put you in a corner when the company stops supporting them, goes out of business, starts charging for upgrades ... you know the drill. In other words, you might get a real boost now. But you have a real risk of paying a steep price for it later. The best of all possible worlds is that Microsoft decides it's a great technology, buys it, and incorporates it as a standard feature. But you certainly can't depend on that happening.

And it's not clear to me that all of this "productivity enhancement" really makes you a better programmer. You still have to have a very clear understanding of what the code does and how to get it to do what you want it to do. If you don't have that, all of these "suggestions" are a little like throwing darts at a code dartboard. You might hit the right statement. You might not.

Does anybody out there use CodeRush (Express or the paid version)? What do you think of it?

Would anybody like to see a tutorial showing how to use it on this site?

Development Methodologies

Thursday March 4, 2010

How to choose the right one?

Flash back to the early 1990's. The "analysis" part of software development is being consumed by a controversy that everybody now calls, "The Method Wars". Over fifty different analysis "methodologies" are being promoted by different experts. Sometimes the main differences were just whether diagrams used circles or boxes to describe things. And the word "wars" is really pretty accurate. These guys were at each other's throats, in a non-violent, academic sort of way. A peace treaty of sorts was finally found when the same company, Rational Software, hired three of the most influential experts and, in the words of one of them, a "critical mass" was created. They all agreed to support the same methodology and UML was born.

More recently, IBM bought Rational Software and when that happened, Microsoft's enthusiasm for UML cooled a lot. Well ... in fact, it froze solid. There's nothing like having your biggest competitor buy the standard to cool your jets about it. Visual Studio Team System has a built in methodology that is not UML anymore and the "Three Amigos" who created UML are divided once again. (One is for Microsoft, one is against them and I can't figure out what the third one wants.)

But, somehow, analysis methodology isn't generating the same level of passion today that it did back then. These days, we seem to have moved closer to the actual end product and development methodology wars are taking center stage. For example, in the upcoming Visual Studio Launch (see ... Visual Studio 2010 Launch Event), you can attend sessions about not only the built-in development support in Visual Studio, but also sessions about Agile Development, Scrum and MVVM. (See the GOB - The About Visual Basic "Glossary of Buzzwords" - for definitions of these and more.)

About Visual Basic Reader Ollie McPhee recently posted a message in the About Visual Basic forum asking for help in deciding which development methodology is the right one to choose.

Do you have an opinion about development methologies? Do you have real-life experience in using one? Do you think it's all a fraud? Tell us which development methodology is the right one in the Reader Response.

A Craftsman Knows His Tools

Saturday February 27, 2010

If you write VB.NET code, then you spend most of your day working with Visual Studio. Sara Ford, the author of Microsoft Visual Studio Tips, points out that with this kind of leverage, even saving one or two keystrokes will be multiplied thousands of times as you work with VS all day long.

I don't normally review Microsoft Press books, but this one is an exception. Read the review here.

Using Numbers from a Windows 1252 or iso-8859-1 Web Page

Saturday February 20, 2010
Peter Way, a reader who works at VentiMar, LLC (they have a nice web page at www.ventimar.com) was having trouble using numbers copied from a web page in an Excel VBA macro. No matter what he did, VBA returned a "Type mismatch" error. The problem was easy to fix, but the reason it happened was more interesting. To see the "Quick Tip" explaining it all, Click Here.
Explore Visual Basic
By Category
About.com Special Features

Reader's Choice Award Winners

What are the best instant messengers, apps, editors and more? You told us, for our 2010 technology awards program. More >

iPad Central

Is Apple's new tablet computer impractical, a must-have -- or both? We'll help you figure it out. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2010 About.com, a part of The New York Times Company.

All rights reserved.