vba textboxes

  reddwarfcrew 14:36 19 Feb 07
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 07

You need to use

Set xform = UserForm1

  reddwarfcrew 15:01 19 Feb 07

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.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

The Pantone Colour of the Year 2017 is Green

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…