Error 429

C

Casper

I can see the "rectangle" class in the object browser. Why should I
have to register it as Err 429 suggests? Where is it and how do I
register it?

My code looks as follows:

Dim Rctl As Rectangle
Set Rctl = New Rectangle
 
B

Brendan Reynolds

You can't create an instance of any of the Access form controls using the
New keyword. You can only assign a reference to an existing control ...

Dim rctl As Rectangle
Set rctl = Me.Box3
Debug.Print rctl.Height

You can create new controls using the CreateControl method, but the form has
to be open in design view. Unless you're creating a form-designing wizard or
builder, it's usually better to create all controls at design time and
toggle the Visible property to show/hide appropriate controls at run time.
 
Top