you'd need code like you had originally for that. the commandbars code is the literal equivalent of clicking the button.