ÒÔ ÏÂ °ì ·¨ ²» Öª ÊÇ ·ñ Âú ×ã Õâ Î» Åó ÓÑ µÄ Òª Çó £¿ Çë Ö¸ Õý ¡£ 
    Dim MyObj as Object 
    Dim TabID 
    Set Myobj=Text1.Container 
    TabID=MyObj.Tab 
<END>    
°¸ 
    First, I am sorry that I don't have a Chinese editor. That means I have to answer this in English. 
    The Left property of controls on the inactive tab of the sstab is set to itsself - 75000 so use the following function can get the tab number of the sstab: 
     
    Public Function TabNumber(Control As Control) As 
    Integer 
    Dim intCurrentTab As Integer 
    Dim intSearchTab As Integer 
    Control.Container.Visible = False 
    intCurrentTab = Control.Container.Tab 
    For intSearchTab = 0 To Control.Container.Tabs - 1 
     Control.Container.Tab = intSearchTab 
     If Control.Left > -100 Then 
     Control.Container.Tab = intCurrentTab 
     Control.Container.Visible = True 
     TabNumber = intSearchTab 
     Exit Function 
     End If 
    Next intSearchTab 
    Control.Container.Tab = intCurrentTab 
    Control.Container.Visible = True 
    TabNumber = -1 
    End Function 
     
    but the side effict this function will fire the click event of the sstab control. I believe that you can use the basic thinking of this function to do your automation. 
<END>    
ÔÚ SSTABÖÐ µÄ µÚ Ò» ¸ö Ò³ Ãæ ¼Ó ¿Ø ¼þ 1£¬ µÚ ¶þ ¸ö Ò³ Ãæ ¼Ó ¿Ø ¼þ 2¡£ 
    È» ºó ÅÐ ¶Ï £º 
     if ¿Ø ¼þ 1.left>0 then 
     msgbox "µÚ Ò» ¸ö Ò³ Ãæ ´ò ¿ª " 
     else 
     if ¿Ø ¼þ 2.left>0 then 
     msgbox "µÚ ¶þ ¸ö Ò³ Ãæ ´ò ¿ª " 
     end if 
     end if 
    ×¢ £º ·Ç ¼¤ »î µÄ Ò³ Ãæ £¬ Æä ÉÏ µÄ Ëù ÓÐ ¿Ø ¼þ µÄ left¶¼ Ð¡ ÓÚ Áã ¡£ 
<END>