Hi,
I'm looking for a VBA implementation of the Memento pattern (GoF). I'm looking at converting the Java version from Wikipedia. It will be used for Undo/Redo functionality for an Excel add-in.
Specifically, I am having difficulty with the line:
return new Memento(state);
Or, to make it more specific, can someone rewrite this in VBA:
public Memento saveToMemento() {
//System.out.println("Originator: Saving to Memento.");
return new Memento(state);
}
The entire code that I am trying to convert is available at the Wikipedia link above.
Thanks