garden_rael
Board Regular
- Joined
- Apr 1, 2008
- Messages
- 100
I'm trying to run a macro that would do some stuff. but before it does, I want it to search for a cell value to see if I'm not entering the same IDCode..
Ex...
You fill Cell C4 with the ID
then fill some other cells with other stuff
The macro will pull that info and add it into a data base... that's already resolved...
My problem is that, if the ID 001 is already entered, It shouldn't be possible to re-enter it...
This is the part where I'm presenting issues
Application.ScreenUpdating = False
Sheets("Base").Activate
Range("A1").Activate
Selection.End(xlDown).Select
v1 = ActiveCell.Row + 1
Sheets("Formulario").Activate
Range("C4").Activate
v2 = ActiveCell.Value
Sheets("Base").Activate
Range("A1").Activate
v3 = Cells.Find(What:=v2, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If v3 = True Then
a = MsgBox("Su ID ya esta registrado, si esto es un error, por favor verifique con el Administrador", vbOKOnly)
Exit Sub
Help me!!! I'm losing my mind! lol
Ex...
You fill Cell C4 with the ID
then fill some other cells with other stuff
The macro will pull that info and add it into a data base... that's already resolved...
My problem is that, if the ID 001 is already entered, It shouldn't be possible to re-enter it...
This is the part where I'm presenting issues
Application.ScreenUpdating = False
Sheets("Base").Activate
Range("A1").Activate
Selection.End(xlDown).Select
v1 = ActiveCell.Row + 1
Sheets("Formulario").Activate
Range("C4").Activate
v2 = ActiveCell.Value
Sheets("Base").Activate
Range("A1").Activate
v3 = Cells.Find(What:=v2, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If v3 = True Then
a = MsgBox("Su ID ya esta registrado, si esto es un error, por favor verifique con el Administrador", vbOKOnly)
Exit Sub
Help me!!! I'm losing my mind! lol