Updated Analyze button handler to use WorkbookState Analyze and Flag calls.