Hello Everyone,

Can someone please suggest an approach or solution to implementing a "Back" or "Undo" function in a macro?

I have a macro that currently records 2 to 24 measurements from an instrument. The User initiates the recording of a single measurement by pressing a physical record button on the test stand.

I then record the value and increment to the next cell (column). I'd like to allow the user to press a back button that will erase the last entered value and be ready to accept another in its place and roll back my counter.

My current function for recording uses Row and Column pointers to track the current row (which contains all the data for each sample measured), and the column to start and end the recording. The end column is determined by User input (NumColumns) at startup on a userForm.

Attached is a the piece of code that Reads the instrument and writes the data to the sheet.

Please Login or Register  to view this content.