Hi,
was wondering if anyone can help me with my problem
Im trying to write a vba code for excel application where the user enters an ID code and the code is entered into a column. Before the id is entered it searches through the column to see if the ID is already in use and if it is will display error msg. However right now im using match to search the column but its on a fixed range. code i used:
strId = InputBox(prompt:="Enter staff ID:", Title:="Staff ID"
strOffset = Application.WorksheetFunction.Match(strId, _
Range("a4:a15", 0)
MsgBox ("Staff ID already exists!"
Because new ID are always entered the range cant be fixed. I tried using currentregion but kept getting errors. Can anyone help me with this?
Lobb
was wondering if anyone can help me with my problem
Im trying to write a vba code for excel application where the user enters an ID code and the code is entered into a column. Before the id is entered it searches through the column to see if the ID is already in use and if it is will display error msg. However right now im using match to search the column but its on a fixed range. code i used:
strId = InputBox(prompt:="Enter staff ID:", Title:="Staff ID"
strOffset = Application.WorksheetFunction.Match(strId, _
Range("a4:a15", 0)
MsgBox ("Staff ID already exists!"
Because new ID are always entered the range cant be fixed. I tried using currentregion but kept getting errors. Can anyone help me with this?
Lobb