+ Reply to Thread
Results 1 to 4 of 4

Setting a label value on a userform dirties the spreadsheet

  1. #1
    Registered User
    Join Date
    06-14-2006
    Posts
    7

    Setting a label value on a userform dirties the spreadsheet

    In a userform, I am populating the caption of a label (via code). This causes the userform/spreadsheet to be "dirtied", causing the "Do you want to save changes?" dialog box to appear.

    How can I prevent this?

    Thanks!
    Barb

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Setting a label value on a userform dirties the spreadsheet

    Good afternoon barbararyan
    Quote Originally Posted by barbararyan View Post
    causing the "Do you want to save changes?" dialog box to appear.
    How can I prevent this?
    Use this line somewhere prior to the code that closes the wroksheet. It should suppress the warning :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    06-14-2006
    Posts
    7

    Re: Setting a label value on a userform dirties the spreadsheet

    Thanks, Dominic... this will work but, if the USER has made changes, I do NOT want to suppress the message. Basically, I want to prevent the form from being "dirtied" when the label caption is populated.

    Thanks,
    Barb

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Setting a label value on a userform dirties the spreadsheet

    Hi barbararyan

    I don't understand what you mean. Could you explain what you are doing / trying to do and what you mean by the form being "dirtied"?

    DominicB

+ 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