+ Reply to Thread
Results 1 to 3 of 3

VBA to enter form values in sheet

  1. #1
    Registered User
    Join Date
    02-01-2014
    Location
    Broward, Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    VBA to enter form values in sheet

    I have a form that I created that has several fields that I want it to enter into specific cells on my worksheet. The information should just rewrite into those same fields everytime they enter data into those fields.

    When I hit "Enter" on my form I want it to:

    Enter Combobox Field 1 into A1
    Enter Text Field 2 into B1
    Enter Combobox Field 3 into C1
    Enter Text Field 4 into D1
    etc.


    Thanks for any help you can provide.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA to enter form values in sheet

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: VBA to enter form values in sheet

    in design mode when you doubleclick the control you will open the click event for that control. this is where you put code to run on clicking (there's a surprise!)

    on the panel above on the right there is a dropdown showing other events available.

    You then have a choice of whether to save the values on the initial change or have an OK-button. either way the control event gives you what you need.

    to reference the cells you can use the

    thisworkbook or activesheet
    or all or part of
    workbooks("workbook.xlsm").sheets("mysheet").range("C1") = textextbox.value

    hope this help you get going


    click on the * Add Reputation if this was useful or entertaining.

+ 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. Use form submission to enter data both in the form and not in the form
    By tsamuels in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 10:06 PM
  2. Replies: 9
    Last Post: 11-26-2012, 06:07 PM
  3. Form to enter data into Excel Sheet?
    By Cyberpawz in forum Excel General
    Replies: 4
    Last Post: 08-31-2011, 03:07 PM
  4. [SOLVED] when you protect a sheet, you can't enter using a form
    By pmms in forum Excel General
    Replies: 4
    Last Post: 08-03-2006, 03:40 PM
  5. [SOLVED] Is there way to enter multiple values into excel cells w/ a form?
    By grassfed in forum Excel General
    Replies: 1
    Last Post: 06-22-2005, 04:05 PM

Tags for this Thread

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