Accessing a Forms Properties

G

Guest

Excel 2003. I have created a user form called "Initialize." How do I
programmatically reference the properties of controls on the form? For
instance, how would I reference and change the Caption property for a textbox
called TextBox1 on the form called Initialize? Thanks for the help.

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
 
G

Guest

Seems like textbox controls DO NOT have a Caption property..
You probably want to creat a new control (a label cotrol) which has
(I think) a caption property.
 
G

Guest

The syntax should be like:
Initialize.TextBox1.Text = "hello"

however, if your piece of code is already within the form "Initialize", you
can just refer to the textbox directly:
TextBox1.Text = "hello"

Regards,
Edwin Tam
(e-mail address removed)
http://www.vonixx.com
 
B

Bob Phillips

A textbox doesn't have a caption. It has a text value though

Initialize.TextBox1.Text = "Doug"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top