+ Reply to Thread
Results 1 to 4 of 4

posting textbox data from a form into a worksheet

  1. #1
    Registered User
    Join Date
    01-30-2007
    Posts
    12

    Exclamation posting textbox data from a form into a worksheet

    hi
    first post

    i have a form that i created in visual basic that opens with the click on a command button on my worksheet. The form has some texts boxes on it. I then have another command button to close the form. When i close the form i want the data entered in the text boxes to be posted into a cell on the worksheet. any help on how to do this is appreiated as i am just starting out in VB and VBA.

    thanks alot
    cH3wY

  2. #2
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    if your userform is named example "Userform1" and the text box you you have is named "Textbox1" then type the following


    sub transferdata

    range("a1").value = userform1.textbox1.value ' transfer the value
    userform1.textbox1.value = "" ' to clear the value

    end sub

    you could place this in your code for the commandbutton or in the code of the command button typ the name of the sub and it will call that sub.
    I am currently looking for new employment. If you like my work please get in touch. (Preferably Permanent position with ?25k p.a but willing to work on small projects for extra cash)

  3. #3
    Registered User
    Join Date
    01-30-2007
    Posts
    12
    thanks alot mate trying it out now

  4. #4
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500

    Thumbs up

    Quote Originally Posted by cH3wY
    thanks alot mate trying it out now
    Wheres me manners???

    WELCOME TO THE BOARD!!! HOPE YOU LEARN AND ENJOY THIS WEBSITE.

+ 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