+ Reply to Thread
Results 1 to 3 of 3

How to create user form that displays values from cells

  1. #1
    Registered User
    Join Date
    04-05-2008
    Posts
    17

    How to create user form that displays values from cells

    Hello,

    I wish to create a User Form that will show the values of some cells when a row is selected and allow one of the cell's values to change.

    For instance, I select the entire row 5. Then I call up the user form. I want the value of the cells in columns A and B to appear in the form. I want to be able to change the value of B5, either by subtracting or adding.

    It seems that the only way to have the values of Columns A and B show in the user form is in text boxes, though I do not want either to be editable. I want to have two other separate text boxes for either adding or subtracting the value of B5. Upon clicking an Enter button, the value of B5 changes and the user form should close.

    I realize there are a lot of questions here. The book I am using to learn VBA--"Excel Programming"--doesn't answer them. I am using Excel 2003.

    Thanks,
    Tom

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516
    1) Create a UserForm (UserForm1)
    2) add Label x 2 (Label1, Label2), CommandButton x 1 (CommandButton1) and a TextBox (TextBox1)
    to the form module
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-05-2008
    Posts
    17

    Thanks!

    Thanks, Jindon.

    Your code worked just fine.

    Tom

+ 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