vba textboxes

  reddwarfcrew 14:36 19 Feb 2007
Locked

Hi I am trying to build some code that call the value from a text box (ie UserForm1.TextBox1.Value), but where the statement is made up from other VBA code. My simple code is:

Dim xForm
xForm = UserForm1
MsgBox(xForm.TextBox1.Value)

However it debugs with 'Object doesn't support this property or method in the msgbox line of code.

Anyone got any ideas?

  VoG II 14:41 19 Feb 2007

You need to use

Set xform = UserForm1

  reddwarfcrew 15:01 19 Feb 2007

I've been working on this since 11am.

I've lost count the different ways I've been trying to do this.

Easy when you know how!

Thanks VoG.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Converse's new logo: the trainer brand looks to its heritage for a fresh identity

Mac power user tips and hidden tricks

Comment lancer Windows 10 en mode sans ├ęchec ?