+ Reply to Thread
Results 1 to 3 of 3

VBA code to lock textbox in a userform which was unloaded to from another userform

  1. #1
    Forum Contributor
    Join Date
    10-03-2015
    Location
    Jamaica
    MS-Off Ver
    2013
    Posts
    120

    VBA code to lock textbox in a userform which was unloaded to from another userform

    Good day all

    I would like a macro which will lock specific textbooks in a userform from a button which was clicked in a previous userform.

    eg When I click say cmd button1 in userform1 (which unloads to userform2) when userform2 opens textboxes 1, 2 & 3 in userform2 are locked (all others would be open).

    any assistance would be appreciated.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA code to lock textbox in a userform which was unloaded to from another userform

    Put this code in userform1. You should be aware that the Intialize event for Userform2 will run before the first TextBox is locked.


    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    10-03-2015
    Location
    Jamaica
    MS-Off Ver
    2013
    Posts
    120

    Re: VBA code to lock textbox in a userform which was unloaded to from another userform

    With a little experimentation i figured it out but i will post my solution for any other person with a similar problem

    Please Login or Register  to view this content.

+ 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. Create a unique ID each time a userform is unloaded
    By kksf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 06:17 AM
  2. [SOLVED] Lock character during entry in UserForm textbox
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2012, 01:54 AM
  3. [SOLVED] Can A UserForm Be Partially Unloaded?
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2012, 06:23 AM
  4. showing the userform again when userform hasn't been hidden or unloaded
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2007, 09:33 PM
  5. [SOLVED] Help with UserForm textbox code
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2006, 05:40 PM
  6. [SOLVED] UserForm from VBA macro is not getting properly unloaded
    By Karve, Ajit in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-08-2005, 05:50 AM
  7. RE: UserForm unloaded still visible
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2005, 05:05 PM
  8. UserForm unloaded still visible
    By allenj3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2005, 05:05 PM

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