Hi guys this is my example:
A user will put an item code on column B and after he/she puts the code he/she then clicks the cell where the code was put, then he will press the shortcut for the macro to run and the macro will do a vlookup on the active cell and fill up the rest of the row with the necessary data. everything is fine except when the user accidentally presses the shortcut for the macro on another column that is not column b the macro will still run and mess up the sheet. So what i'd want is a macro to put at the beggining of my original macro that when the active cell is not on column b, the macro will return an error saying "you must be in column B to perform this macro". Here is my code:
The code above's intention is that the activecell must be on column B so the necessary cells next to it will be filled correctly.
Bookmarks