Chris Rae's VBA Pages

Common Problems

There are a few problems that always seem to come up in VBA programming - I intend to list as many as I can here as soon as I can remember them or people mail information about them to me.

The error "Cannot initialize Visual Basic environment" or "Cannot open macro storage" appears
This is an installation or corruption problem - it's probably best solved by reading Microsoft's Knowledgebase article Q162053 (link points to Microsoft's support site), which explains the problem and provides solutions. The problem can also arise because of incorrect references in the document being loaded.

I can't make the headings in my multi-column list box!
No, you're right, you can't. It's a known bug in Office 97/2000/2003; the object property doesn't exist. For more information (but not a real solution) see Knowledgebase article Q164343. Tantalisingly the "ColumnHeads" Boolean property exists (to switch them on and off) but there's no actual way to populate them.

In Word, I specified the Temporary:=True parameter but my command bar still saves in my normal template
So it does! Sorry, this is broken too in Word 97. I believe it to be fixed in 2000 onwards. See article Q163602 in the Microsoft Knowledgebase for more information.

You may want to go back to the main index for my Visual Basic for Applications Pages.