+ Reply to Thread
Results 1 to 6 of 6

Using macro to strikethrough a label

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    Nashville, TN,USA
    MS-Off Ver
    Excel 2007
    Posts
    87

    Using macro to strikethrough a label

    Hello all! I have a userform which I added a frame and about ten labels. These labels I am using as a task list. Whenever a user completes a task I want the label to be crossed out. I have already added the code to the end of each task. example:

    Please Login or Register  to view this content.
    Worked great for only one task. When the code runs from another module (second task) the strikethrough is only on the second task. The first label goes back to normal. Any help?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using macro to strikethrough a label

    Hi,

    I think you'll need to upload the workbook so that we can see the question in context.

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    Nashville, TN,USA
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Using macro to strikethrough a label

    Ok while creating the test workbook, i noticed that the labels stayed crossed out while the userform was open, but when I added the UNLOAD the labels reset upon opening again.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using macro to strikethrough a label

    Hi,

    Instead of Unloading the form just hide it. i.e.

    Please Login or Register  to view this content.
    HTH

  5. #5
    Registered User
    Join Date
    04-04-2009
    Location
    Nashville, TN,USA
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Using macro to strikethrough a label

    Thank you for that. It seems that all of my probs are easy fixes. The only prob with this result is that if the user uses the "X" window button, the form unloads. Is there a way to disable that button?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using macro to strikethrough a label

    Hi,

    Just use the form's QueryClose event. i.e.

    Please Login or Register  to view this content.
    Rgds

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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