M
Mike Hughes
Hello
I'm really stuck. I'm attempting to make a quick drawing program using the line object provided in the toolbox but I also want to be able to add lines in code (ie. Dim newLine As Line) but I can't seem to figure out a way to do it
If I do a "Dim newLine As Line" and then try to edit it's properties (ie. newLine.Visible = true) then the program errors at runtime with the error "Object variable or With block variable not set
If I try to do a "Set newLine = New Line" after the Dim then the program has another runtime error "ActiveX component can't create object"
I've looked high and low and tried almost everything but I still can't get it to work. It's probably something really simple but I'm not a VB programmer usually so the smallest things trip me up at times
Thanks for any help you can provide.
I'm really stuck. I'm attempting to make a quick drawing program using the line object provided in the toolbox but I also want to be able to add lines in code (ie. Dim newLine As Line) but I can't seem to figure out a way to do it
If I do a "Dim newLine As Line" and then try to edit it's properties (ie. newLine.Visible = true) then the program errors at runtime with the error "Object variable or With block variable not set
If I try to do a "Set newLine = New Line" after the Dim then the program has another runtime error "ActiveX component can't create object"
I've looked high and low and tried almost everything but I still can't get it to work. It's probably something really simple but I'm not a VB programmer usually so the smallest things trip me up at times
Thanks for any help you can provide.