+ Reply to Thread
Results 1 to 4 of 4

how to add user defined properties to a textbox?

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Frankfurt
    MS-Off Ver
    Excel 2003
    Posts
    2

    how to add user defined properties to a textbox?

    Hello,

    I am new to VBA and I wrote an user form with text boxes and combos. Based on the user input I need to delete the textbox contents from the old column to a new column in the same row of the active sheet. I'd like to save the old and new column index in new user defined properties of the text boxes, e.g. textbox1.OldCol and textbox1.NewCol. How can I add new properties to a textbox?

    Thanks!
    Last edited by jayzee; 06-19-2010 at 03:25 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: how to add user defined properties to a textbox?

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: how to add user defined properties to a textbox?

    You can't add properties to a Control. You could store the details as Variables,but the Variable would only last whilst the UserForm was in use
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    06-18-2010
    Location
    Frankfurt
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: how to add user defined properties to a textbox?

    Quote Originally Posted by royUK View Post
    You can't add properties to a Control.
    This is what I needed to know, thanks!

+ 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