+ Reply to Thread
Results 1 to 12 of 12

Userform label properties always set to True?

  1. #1
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Userform label properties always set to True?

    I have a userform that updates a label with font settings that are stored in textboxes.

    The label update code is as follows:

    Please Login or Register  to view this content.
    Stepping through the code, any time either .Bold or .Italic is encountered, the property is always set to True, even when the command is to set it to false.

    Does anyone have any thoughts on why this would be?

    Thanks,
    Dave

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Userform label properties always set to True?

    Hi & welcome to the board
    That code works fine for me.
    Can you supply your workbook?

  3. #3
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    Thanks for the reply. I am new to this forum and am having difficulty finding
    how to attach the workbook. I tried the paperclip option in the menu, but it
    doesn't seem to work..

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Userform label properties always set to True?

    Unfortunately the paperclip doesn't work at the moment

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    I'll supply details and paste the code since I am unable to upload the file.

    The project is designed to read font settings from cell A1 on Sheet1 and apply those
    settings to a label on a userform. The user is then able to make changes to the settings
    via the userform, and click OK to return those settings to cell A1.

    Sheet1 code:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    File attached?
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Userform label properties always set to True?

    That code & your original code work fine for me.
    Without a copy of your workbook, there's not much I can do to help.
    There doesn't need to be any data in the workbook, just the userform & code.

  8. #8
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    A separate issue with this same project is that when the userform loads, at different times, each one of the three listboxes fails to have the .value property set. This results in the associated textbox being set to null.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Userform label properties always set to True?

    Thanks for the file.
    Unfortunately it works fine for me, so not sure what the problem is.
    Whenever I change the font, type or size the label changes accordingly

  10. #10
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    After the userform initially loads, are all three textboxes populated for you as well?

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Userform label properties always set to True?

    Yes & the values that represent the format of A1 are selected.

  12. #12
    Registered User
    Join Date
    05-30-2019
    Location
    Wisconsin, USA
    MS-Off Ver
    2016
    Posts
    7

    Re: Userform label properties always set to True?

    Thanks for taking the time to look at this. Although it is still not resolved, at least I know the logic is correct. If anyone else has some insight, I'd appreciate it. I am running Windows 2016 Server, and Excel 2016.

+ 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. Follow hyperlink stored in label controltiptext when clicking on userform label
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2015, 08:24 AM
  2. Change userform label height without changing label width
    By vamosj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-16-2015, 01:08 PM
  3. Properties for Label Caption when using VB Script to change.
    By Marie A. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2014, 08:23 AM
  4. [SOLVED] Change the properties of a userforn textbox based on the backcolor of a label
    By chipnputt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2014, 10:47 PM
  5. [SOLVED] Multiple TextBox / Label.Visible = True
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2013, 09:35 AM
  6. Data Label Properties/Methods in Charts
    By bchandz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2013, 04:31 PM
  7. checkbox true/false label
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-04-2005, 12:05 PM

Tags for this Thread

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