Consulting

Results 1 to 9 of 9

Thread: Simple Data Entry form

  1. #1

    Simple Data Entry form

    I use to be pretty good with old Lotus macros, but when the world went to Excel and visual basic, it left me behind and I've been trying to avoid VBA for 15 years.

    However, now I am faced with trying to create a simple input screen and I find I lack the basic skills to do this. I've built an input form with data validation fields, vlookups and formulas that change the fill color of certain cells based on date entered, but I want apply a simple VBA which will make the cursor move to the right when the person hits enter. I know this is very basic but I've search this site for two hours and I can't find the information I need to build this simple input document. I want the VBA to wait for a user to enter something in a cell and press enter.

    The complication I've added to my spreadsheet is that the sheet is protected and I only want the person to move to the next nonprotected cell and once they reach the last non protected cell on a row (column J), I want the cursor to move down one row and 9 rows to the left and repeat.

    I want this VBA to start when the spread sheet is opened.

    Can some one provide me with some basic code to achieve this simple form.


    I thank you in advance for any guidance you can provide.


    DustMaker

  2. #2
    Can you provide an example workbook please ?

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    We can easily set up a macro to control where the User goes to (a sheet or form) on opening the workbook. We can also control where the focus is set to, and control next cell to focus on, and remind the User to fill certain cells before moving to the next cell.

    Please attach a sample workbook, by clicking on Go Advanced, scroll down to Manage Attachments and follow the prompts from there.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You already have what you need. Get them to hit the TAB key after entering data.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5

    Sample file

    attached is as extract from my working file.

    this is to be used for a physical inventory and specifically for tag entry.

    the sheet must be protected, which will restrict access to fields I don't want them in.

    My goal is to minimize the key strokes while at the same time ensuring correct data.

    The attached file has sheet protection turned on, but no password.

    Thank you
    Attached Files Attached Files

  6. #6

    i attached the file in a separate post - thanks for your interest

    Quote Originally Posted by russtownsend
    Can you provide an example workbook please ?

  7. #7
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    When you protect the sheet, unselect the first option that allows them to select locked cells.

  8. #8

    protection on

    Quote Originally Posted by Kenneth Hobs
    When you protect the sheet, unselect the first option that allows them to select locked cells.
    Thank you. I am already doing this.

    What I am trying to do, is change individual cells from unprotected to protected so that the option you mention works completely. What i am building is a physical inventory tag input screen. Items can be counted as eaches or feet or pounds. the unit of measure is pulled in from a lookup table. Based on this value, I want to protect the cells that do not apply. For example, if the part number has a Uof M of pounds, then I want to protect the cell for eaches and the cell for feet. This way, it will save key strokes because their cursor will go directly to the pounds field and won't let them enter a value in feet or each.

    I'm unable to find a formula that would change the format of a cell to protected or unprotected, so I am attempting to do this in visual basic.

    I hope this clarifies what I am trying to do.

  9. #9
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Protect the columns and it should work ok and then the protect that I explained. I don't see a reason to edit the protected cells.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •