Ok folks, I'm stealing bits and pieces of code examples that I'm find on the internet as well as the help tool in Visual Basic to try and make this work. What I'm trying to do is create a macro that will help me with the inventory at my store. I'm using Excel to do so. The following code is what I have so far.
Sub Inventory()
Cells.Find(What:=InputBox("Please Scan ID Number", "Inventory"), _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Worksheets("Sheet1").Activate
With ActiveCell
.Interior.ColorIndex = 6
End With
End Sub
This code will currently search the spreadsheet for the cell matching the product the user is scanning and fill the cell yellow. This part is working correctly. From here I need the macro to automatically restart so the user can scan the next piece of merchandise. I would also like a warning box to pop up if the macro is not able to find a match saying "No Match Found" Like I said, I am not a programmer at all and am just looking for help on this. Any help would be greatly appreciated!
Thanks,
-Mike
Sub Inventory()
Cells.Find(What:=InputBox("Please Scan ID Number", "Inventory"), _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Worksheets("Sheet1").Activate
With ActiveCell
.Interior.ColorIndex = 6
End With
End Sub
This code will currently search the spreadsheet for the cell matching the product the user is scanning and fill the cell yellow. This part is working correctly. From here I need the macro to automatically restart so the user can scan the next piece of merchandise. I would also like a warning box to pop up if the macro is not able to find a match saying "No Match Found" Like I said, I am not a programmer at all and am just looking for help on this. Any help would be greatly appreciated!
Thanks,
-Mike