+ Reply to Thread
Results 1 to 3 of 3

Program "New Entry" button to prompt when there is a duplicate data.

  1. #1
    Registered User
    Join Date
    06-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    3

    Program "New Entry" button to prompt when there is a duplicate data.

    1.) How do i program the New Entry button to prompt me when there is a duplicate data in the "Data" sheet of the workbook. Duplicate data means when both the Hull Number and the Shipyard Built is the same.

    2.) How can i program the VBA code for the search button to check both shipyard built and hull number instead of just Hull number now.

    3.) I have a "Other" included in my userform but i am unsure how to program it. For example, if a user press "other shipyards" in the dropdown menu for the shipyard, he will be prompted to enter the shipyard name in the "others" field instead.

    3) How can i protect the Excel sheet such that people can only press search and new entry and unable to goto "Data" sheet.

    Finally.. I have very little knowledge in VBA and i managed to come with this code from ebooks and several other programs.
    Attached Files Attached Files
    Last edited by ariffinaldo; 06-04-2013 at 06:31 AM. Reason: Add the Excel sheet

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Program "New Entry" button to prompt when there is a duplicate data.

    great place to start learning.

    point 1

    I would do an if application.worksheetfunction.countifs >0 based on your columns and criteria.

    Use sumifs in the sheet to see how it works, then you can code it.

    point 2

    have a hidden column, concatenating the 2 searchfields, and concatenate them in your code before the find, so "shipyard1Hull1" and a formula of something like "a1&a2" in the data sheet

    point 3

    look at the .visible property of comboboxes and use the form initialise to set the form up for users.
    Last edited by nathansav; 06-04-2013 at 06:51 AM.

  3. #3
    Registered User
    Join Date
    06-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Program "New Entry" button to prompt when there is a duplicate data.

    Thank you. I will look into those.

+ 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