Thanks Adam, It worked.
I used it as following
Changing the Editor to HML Mode : _set_ActiveTab(OBJ_Editor1, 'Code')
Changing the Editor to Normal Mode : _set_ActiveTab(OBJ_Editor1, 'Edit')
Changing the Editor to Preview Mode : _set_ActiveTab(OBJ_Editor1, 'View')
Thanks again.