In addition to Jan's answer, your example code would never work!
[quote user="John Kapopoulos"]Dim inElem as MbeElement if inElem.isTagged = 1 then End If[/quote]
Dim inElem As MbeElement
You have declared a variable of type MbeElement. At his point your variable inElem does not contain any data because you have not initialised it or assigned it any value.
inElem.isTagged
The message you see is correct: you have a variable inElem that is not set to anything. You would see a similar message in most programming languages. Rather than waste time on BASIC examples, start using MicroStation VBA.
You will find examples in VBA help, and more on our web site.
Since you're interested in tags, you may find this article about tags and VBA useful.