+ Reply to Thread
Results 1 to 4 of 4

User form with text boxes showing content of some active cells

  1. #1
    Registered User
    Join Date
    04-09-2010
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    9

    User form with text boxes showing content of some active cells

    I want to have a form with two textboxes on it where the first textbox shows the value of the cell in column C for the active row and the second textbox shows the value of the cell in column E for the active row. If I use the Worksheet_SelectionChange event, how do I populate the two text boxes with the content of the two cells from the active row.

    If text is typed in one of the text boxes I want the associated cell to be updated. Is it possible to have it so that when text is typed in either the cell or the textbox, the associated textbox / cell is updated immediately. If the associated cell / textbox can't be updated immediately, it will probably be ok for it to be updated when ENTER is pressed.

    Also, is it possible to have a shortcut key that switches focus to the form and another one for switching focus back to the spreadsheet?

    TIA

  2. #2
    Registered User
    Join Date
    11-25-2008
    Location
    Poland
    MS-Off Ver
    MSO 2K3, 2K10
    Posts
    84

    Re: User form with text boxes showing content of some active cells

    In Sheet module:
    Please Login or Register  to view this content.
    and in UserForm1 with two TextBoxes (TextBox1, TextBox2):
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    04-09-2010
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: User form with text boxes showing content of some active cells

    That works. Thanks a lot.

    The escape key is giving me a problem. Pressing escape when the focus is in the textbox clears all the text. Is there any way to stop that?

    Also, is there any way to switch focus to the form when a particular key is pressed and to switch back to the worksheet with another key?

  4. #4
    Registered User
    Join Date
    11-25-2008
    Location
    Poland
    MS-Off Ver
    MSO 2K3, 2K10
    Posts
    84

    Re: User form with text boxes showing content of some active cells

    In vbModeless mode you have access to the sheet.
    Is it too little? Do you need keyboard shortcuts?


    The escape key is giving me a problem.
    Add procedures to UserForm1 module:
    Please Login or Register  to view this content.
    Artik

+ 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