+ Reply to Thread
Results 1 to 4 of 4

Accessing a Forms Properties

  1. #1
    Chaplain Doug
    Guest

    Accessing a Forms Properties

    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

  2. #2
    Jim May
    Guest

    RE: Accessing a Forms Properties

    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.

    "Chaplain Doug" wrote:

    > 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


  3. #3
    Edwin Tam
    Guest

    RE: Accessing a Forms Properties

    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
    edwintam@vonixx.com
    http://www.vonixx.com

    "Chaplain Doug" wrote:

    > 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


  4. #4
    Bob Phillips
    Guest

    Re: Accessing a Forms Properties

    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)

    "Chaplain Doug" <ChaplainDoug@discussions.microsoft.com> wrote in message
    news:C862F8E7-7E5F-448D-B3F6-8A718741B64A@microsoft.com...
    > 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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1