Userform-Transferred Data must not be editable

Important Notice

Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Can we actually make a textbox data from a userform not editable when it is transferred to a column? I have a textbox that collects current date and time when it's submitted. When submitting the form, user will not be able to write or select any date as it comes automatically. (Refer photo below).

    With txtdateac
        txtdateac.Text = Format(Now(), "DD/MMM/YYYY/HH/NN/AM/PM")
        End With

    However, user can change the date and time after it has been submitted. The only way I can think of is to lock the cells for editing.

    Are there any options besides locking the column? Thanks for your support!

  • Just to add on, here's the full code I designed for the form.

  • You would need to lock the cells and protect the sheet.

    The code would then need to unprotect the sheet before entering data, afterward restore the protection. Alternatively, use Protect with UserInterFace Only, read more and get an example file here

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!