XL97: ????? ????? ??????? ??????? ????? ???????

???? ???????: 158244 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

??? ??? ???? ?? ?? ???? ????? ??? ???? ?????? ???? ??? ????? ??? ????? ????? ????? ????? ??? ???? ???????. ??????? ??????? ??? ?????? ????? ?????? ? ??? ???? ?? ???? Microsoft Excel ??? ????? ??? ???? ????? ????? ??????? ??? ???? ????? ??????? ? ??? ????? ?? ?????? ????? ??? ???? ?????.

???? ??? ??????? ????? ????? ????? ????? ????? ????? ??? ??????? ??? ???? ????.

??????? ????

?????? ????? ????? ????? ????? ??? ???? ??????? ??????? ???????? ???????:
  • ????? ????? ?????? ????? ???????? WithEvents ?????? ????????. ???? ??????? ?????? ???????? WithEvents ????? ????? ???? ???? ?????? ??? ??????? ??????? ?????? ???? ActiveX (??? ?????? ?????). ??????: WithEvents ????? ??? ?? ??? ?????? ?????.

  • ????? ????? ??? ????? ????. ??? ???? ??????? ????? ????? ????? ??? WindowResize ?? WorkbookOpen SheetActivate ???? ????? ???????? WithEvents.
  • ????? ?? ????? ????? ??? ????? ????? ???????.
?????? ?????? ?????? ??? ??????? ?????? ????? ????? ?????? ??? ???? ????? ??? ?????? ????? ??? ?? ???? ?????? (????? ????? ????? ???????).

????? ?? ??? ????? ????? ???????

  1. ??? ???? ????.
  2. ??? ????? ???? Visual Basic.
  3. ???? ??? "???? ????? ?????" ?? ????? "?????".

    ????? ??? ??? ????? ???? ????? ???? ??????? "< ??? ???? > - Class1 (???)" ?? ???????.
  4. ???? ????? ?????? ?? ????????? ???????? ?? Class1 ?????? ??????? (???):
           Public WithEvents appevent As Application
    						
    ?????? ???????? WithEvents ???? ????? appevent ?? "????" ????? ?????? ?? Class1 ???? ?????? ??????? (???).
  5. ?? Class1 ???? ?????? ??????? (???) ? ???? ??? "????" ????? - ????? ?? ???? ??? appevent ?? ???????.
  6. ?? Class1 ???? ?????? ??????? (???) ? ???? ??? ??????? ????? - ????? ?? ???? ??? WindowResize ?? ???????.

    ????? ??? ?????? ?? ??? ??? Class1 ???? ???? ????? (???):
        Private Sub appevent_WindowResize(ByVal Wb As Excel.Workbook, _
            ByVal Wn As Excel.Window)
    
        End Sub
    						
  7. ????? ??? ??? Class1 ???? ???? ????? (???) ???? ???? ??? ???:
           Public WithEvents appevent As Application
    
    
           Private Sub appevent_WindowResize(ByVal Wb As Excel.Workbook, _
               ByVal Wn As Excel.Window)
    
               MsgBox "you resized a window"
    
           End Sub
    						
    ??? ???? ????? ??? ????? ???? ?? ????? ?? ?? ?????? ?????? appevent ?????? Class1 ??? ???????. ???? ??? ??? ????? ????? WithEvents ? ??? ??????? ???? ?? ???? ???? ?????? ??. ??? ????? WithEvents ?????? ??? ?? ????? ????- ????? ??? ????? ???? ?? ????? ???? ??? ?????? ??? ??????? WithEvents.
  8. ?? ??????? ????? ???? ??? ???? ????? ????? ???? ???? ????? ??? ??? ?? ???????.
  9. ?? ??? ?????? ?????? ??????? ???? ???????? ???????? ???????:
          Dim myobject As New Class1
    
          Sub Test()
              Set myobject.appevent = Application
          End Sub
    						
  10. ????? ????? "??????". ??? ??? ?????? ????? ??????? ?? ??? ??? ????? ??? ???? ???? ?? Microsoft Excel ???.
  11. ?? ??????? ???? ???? ??? "????? ?? ?????? ??? Microsoft Excel".
  12. ????? ??? ???? ????.
???? ??? ???? ????? ?? ????? "???? ??? ????".

????? ????? ????? ????? ???????

??? ??? ?????? ?????? ???? ????? ??? ????? ????? ???? ????? ????? ????? ??????? ????? ???????. ?????? ????? ??????? ??????? ?? ??? ???:
  1. ??? ????? ???? Visual Basic.
  2. ?? ????????? ???????? ??????? ???? ?????? ?? ?????? 9 ? ????? ???????:
          Sub test()
              Set myobject.appevent = Nothing
          End Sub
    						
  3. ?? ?????? ??????? "??????" ??? ????.
  4. ?? ??????? ???? ???? ??? "????? ?? ?????? ??? Microsoft Excel".
  5. ????? ??? ???? ????.
?? ??? ??? ???? ?????.

?????

????? ?? ????????? ??? "????? ????? ???" ?? ???? Visual Basic ???? ??? "??????? ? ??????" ?? ??????? "???????" ? ???? ??? ????? ??????? ???? ? ???? ???? ??????
??? ???? ?????
??? ?? ???? ????? ??????? ??? ???? ?????? ??? ???????? ??? ????? "?????? ??????? ? ????? ???? ????? ????? (????? ?????)".

???????

???? ???????: 158244 - ????? ??? ??????: 18/?????/1427 - ??????: 1.2
????? ???
  • Microsoft Excel 97 Standard Edition
????? ??????: 
kbmt kbdtacode kbfaq kbhowto kbprogramming KB158244 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????158244
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????