+ Reply to Thread
Results 1 to 6 of 6

Label caption changes on textbox entry

  1. #1
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Iowa
    MS-Off Ver
    2007
    Posts
    212

    Label caption changes on textbox entry

    At some point in writing/rewriting code for a label and related textbox I've created an error. The label has a caption name "Part" and the textbox is named "tbxPart". On the form, when a value is entered in the textbox and tabbed off, the label caption changes to "-2147483630". There is code that changes the label text to red and the textbox back color to salmon if left blank when the user clicks the Add button.

    All was working as planned and then while making some changes (don't know exactly when/what) this started happening.

    Any Ideas?

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Label caption changes on textbox entry

    You'll need to post the code so we can troubleshoot please

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Label caption changes on textbox entry

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Iowa
    MS-Off Ver
    2007
    Posts
    212

    Re: Label caption changes on textbox entry

    Hopefully this works, I've attached a .txt file with the complete code for the form.
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Label caption changes on textbox entry

    Can't see anything in that code that explicitly sets the caption of a label.

    There is however this,
    Please Login or Register  to view this content.
    which might be setting the caption of a label named NewGrouplbl to the value of the ForeColor property of the userform.

  6. #6
    Forum Contributor
    Join Date
    04-20-2017
    Location
    Iowa
    MS-Off Ver
    2007
    Posts
    212

    Re: Label caption changes on textbox entry

    Norie,

    That does fix the issue. Now I need to go look at some of the other forms and see what I have different there that allows this to work. Must be some tiny difference in the setup.

    Thank You!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Hide / unhide textbox based on label caption
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2016, 01:35 AM
  2. label caption to convert the date in a textbox
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2014, 04:30 PM
  3. [SOLVED] Change label caption's font color based on value in another textbox
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-19-2013, 01:59 PM
  4. [SOLVED] Assign label caption based off of textbox value
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-17-2013, 12:36 PM
  5. [SOLVED] Label caption
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-25-2013, 09:31 AM
  6. Display label caption
    By Nancy123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2010, 07:49 AM
  7. [SOLVED] Format Label.Caption or Textbox data
    By RobC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2005, 08:06 PM

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