Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I have been searching the site and am not finding just a basic code that: Looks at the invoice number being entered in the userform it then looks through a range named "database" looking specifically in column "A" for the number of matches and simply prompts a messages box saying "You have XX number of matching invoice numbers do you still want to continue Yes/No" Thank you for your help. -- Though daily learning, I LOVE EXCEL! Jennifer |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cnt as Long
cnt = Application.Countif(Range("Database"),Trim(useform 1.Textbox1.Text)) If cnt 0 then ans = msgbox ("You have " & cnt & " number of matching invoice numbers",vbYesNo) -- Regards, Tom Ogilvy "Jennifer" wrote in message ... Hi there, I have been searching the site and am not finding just a basic code that: Looks at the invoice number being entered in the userform it then looks through a range named "database" looking specifically in column "A" for the number of matches and simply prompts a messages box saying "You have XX number of matching invoice numbers do you still want to continue Yes/No" Thank you for your help. -- Though daily learning, I LOVE EXCEL! Jennifer |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey Tom,
Thanks! What would the code be if the person answers "No" for it to Exit Sub? I think that'll do it. Thank you again. -- Though daily learning, I LOVE EXCEL! Jennifer "Tom Ogilvy" wrote: Dim cnt as Long cnt = Application.Countif(Range("Database"),Trim(useform 1.Textbox1.Text)) If cnt 0 then ans = msgbox ("You have " & cnt & " number of matching invoice numbers",vbYesNo) -- Regards, Tom Ogilvy "Jennifer" wrote in message ... Hi there, I have been searching the site and am not finding just a basic code that: Looks at the invoice number being entered in the userform it then looks through a range named "database" looking specifically in column "A" for the number of matches and simply prompts a messages box saying "You have XX number of matching invoice numbers do you still want to continue Yes/No" Thank you for your help. -- Though daily learning, I LOVE EXCEL! Jennifer |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yeah for me I answered my own question. I'm learning though it may be at a
turtles pace:) -- Though daily learning, I LOVE EXCEL! Jennifer "Jennifer" wrote: Hey Tom, Thanks! What would the code be if the person answers "No" for it to Exit Sub? I think that'll do it. Thank you again. -- Though daily learning, I LOVE EXCEL! Jennifer "Tom Ogilvy" wrote: Dim cnt as Long cnt = Application.Countif(Range("Database"),Trim(useform 1.Textbox1.Text)) If cnt 0 then ans = msgbox ("You have " & cnt & " number of matching invoice numbers",vbYesNo) -- Regards, Tom Ogilvy "Jennifer" wrote in message ... Hi there, I have been searching the site and am not finding just a basic code that: Looks at the invoice number being entered in the userform it then looks through a range named "database" looking specifically in column "A" for the number of matches and simply prompts a messages box saying "You have XX number of matching invoice numbers do you still want to continue Yes/No" Thank you for your help. -- Though daily learning, I LOVE EXCEL! Jennifer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Duplicate entries | Excel Discussion (Misc queries) | |||
Duplicate entries | New Users to Excel | |||
Duplicate entries | Excel Worksheet Functions | |||
duplicate entries | Excel Worksheet Functions | |||
Duplicate Entries | Excel Discussion (Misc queries) |