Re: Creating new textbox at run time

Tech-Archive recommends: Fix windows errors by optimizing your registry



Do you really need to add a new textbox, or can you have a hidden one that
you make visible when you need it?

If you really do need one, take a look at the CreateControl method.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Ray Pixley" <r.pixley@xxxxxxxxxxx> wrote in message
news:m4u8f.811$iE5.104@xxxxxxxxxxx
> Is it possible to use VBA to create a new textbox at runtime? the code
I'm
> using is
>
> Private Sub NewButton_DblClick(Cancel As Integer)
> Dim aaa As Access.TextBox
> Set aaa = New Access.TextBox
> ....
> ' (eventually in another routine I'll use Set aaa=Empty)
> End Sub
>
> I keep getting the message "Run Time Error '492'. ActiveX component
cannot
> create an object." The help for that error message is no help.
>
> I want to use it to create and manipulate bookmarks on images without
> changing the image, so I only need the manipulation properties (top, left,
> move, etc.) and a transparent center. I need to be able to create and
> delete them, perhaps many of them, as the images are changed. Otherwise,
I
> need just the manipulation (top, left, move, etc.) and bordor (red, green,
> dotted) properties or methods and a transparent center.
>
> I've tried the line object as a substitute since a textbox might be
> overkill, but no joy.
>
> Thanks
>
>


.


Quantcast