Share via

Disabling Function of a Private Sub

Mark 1 Reputation point
2021-11-25T07:54:37.043+00:00

I am doing a form using the userform in excel.

The form has the following capability
a. save to dump the data on one sheet of the excel
b. retrieve the data that was previously saved to make changes using the search button
c. one of the checkboxes has the code for .vbinformation (to ensure that they enter the answer to a text box available beside)
d. one of the checkboxes has the feature to show another user form to enter data needed.

However, I want to disable the function C and D above whenever I retrieve the data from the dumpfile and just have the checkboxes automatically checked without running the C and D feature as it is only applicable whenever the data being entered is new and not the old.

Please help on what should I need to do about this?

Thanks,
Mark

Microsoft 365 and Office | Development | Other
Developer technologies | Visual Basic for Applications

1 answer

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2021-12-05T09:17:36.783+00:00

    In the code for b., incorporate commands to set the Enabled attribute of the c. and d. checkboxes to False

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.