Consulting

Results 1 to 2 of 2

Thread: Code to allow A Customers ID to only go in a spread up to 3 times?

  1. #1

    Code to allow A Customers ID to only go in a spread up to 3 times?

    I have created a spreadsheet to place the Customers ID into and a games they have selected in the userform.

    They can only do this 3 times so is there a way of only allowing this up to 3 times?

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    considering you haven't provided much information or an example this is the best you will get![VBA]
    Dim IdCount as long
    IdCount=Application.WorksheetFunction.=COUNTIF(Range("A1:A20"),"CUSTOMER ID HERE")
    If IdCount>3 Then
    MsgBox "ID Count Exceeded", "Registration Count"
    End If
    [/VBA]
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

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