+ Reply to Thread
Results 1 to 2 of 2

referring to objects using string variables?

  1. #1
    Registered User
    Join Date
    09-16-2005
    Location
    Bangalore, India
    Posts
    47

    Question referring to objects using string variables?

    Hi,

    Is there a method to check the value stored (or displayed) in a textbox (or combobox) using the name of the textbox(or combobox) stored in a string variable?

    Example: Something like this...
    =====================================
    Dim ObjectName as String, EnableButton as Boolean, I as Integer
    ObjectName= Cells(I, 2).Value

    For I = 0 to UserFormName.Controls.Count = "" then
    If not UserFormName.ObjectName.Value = "" then
    EnableButton =true
    EndIf
    Next I
    =====================================
    Thanks,
    Baapi

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Baapi,

    These macros will retrieve the text from a TextBox or ComboBox on the Active UserForm. The active UserForm is always index 0 in the collection.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ 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