+ Reply to Thread
Results 1 to 4 of 4

Form not adding data

  1. #1
    Registered User
    Join Date
    11-11-2010
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    16

    Form not adding data

    the button on the total tab should open a form that should have item Quantity Lot number location and description. form pulls up but getting error when data is entered.


    what I want is the item to have a drop down that pulls its data from the product tab
    and the location have a drop down that has wh1 wh2 wh3 wh4 the data will be placed in the sheet that is selected
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Form not adding data

    You have several naming errors in your code:
    Set ws = Worksheets("wh"), but there is no sheet "wh"
    txtItem is a label, the textbox is TextBox1, etc. In fact you seem to be using the label names in place of the textbox names throughout the code.
    Last edited by protonLeah; 11-14-2010 at 04:04 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    11-11-2010
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Form not adding data

    Thanks for the help! i am very new to this and i am confused on how i need to finnish this. do you have any sussestion on how i need to fix this?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Form not adding data

    Change the code to match the correct controls, sheets etc.

    Use Option Explicit to avoid mistakes like this, do some reading on basic VBA coding
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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