+ Reply to Thread
Results 1 to 3 of 3

Help with creatingg a VBA code

  1. #1
    Registered User
    Join Date
    07-20-2012
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    42

    Help with creatingg a VBA code

    I have a user form that a user selects a name from a combo box and then enters a date in a text box(I may use a DTPicker instead of a textbox). I have a button called “Add” on the form. What I need is a code that when the Add button is clicked, the code looks up the value in the combo box in column A of sheet1 and when found searches that row for the next empty column and adds the value that was in the text box.

    As another step. I need the code to look for duplicate dates within the row on sheet 1, sheet 2andsheet 3. The row number the is found on sheet 1 will be the same on sheets 2 and 3. If it finds the value within those sheets, then I would like a message box to say “ Date already on file as (sheet name)” and then not add the date to sheet1. If it is not possible to search for duplicates on 3 different worksheets, then the 1 work sheet is ok.

    I hope that someone can help me with this.

    thanks

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Help with creatingg a VBA code

    help us please attaching a sample file
    If solved remember to mark Thread as solved

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Help with creatingg a VBA code

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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