????? ??????? ?????? ??? ?????? Script

?????? ????????? ?????? ?????????
???? ???????: 184742 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

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

??????? ????

???? ?????? ??? ???? ???? ???????? ????? ??????? ???? ??? ??????? ?????? ???? ????? ????? ???????? ?????. ??????? ??????? ??????:
   Property         Description
   -----------------------------------------------------------------
   Number           Error number.
   Description      Error message.
   Line             The line number the error occurred on (1 based).
   Column           The column number the error occurred on (0 based).
   Text*            The text of the line that caused the error.
   Source**         What component caused the error.
   HelpFile***      Help file name provided by the error source.
   HelpContext***   Help context provided by the error source.
				

* ??????? Text ???? ????? ??? ??????? ?????? ????? ??? ?????? ????? ?????.

** ??????? Source ?? VBScript ?? ??? ??????? ??????? VBScript Microsoft ?? Microsoft VBScript ??? ??? ???????. ??? ?? ??????? ??? ??????? ???? ?????? ?? ????? ??????.

*** ???_??????? ? HelpContext ??????? ????? ???????? ???????? ?? ???? ?????.

???: ???? Microsoft ??????? ???????? ??? ??? ?? ???? ??????? ?? ?? ????? ? ? ?? ????? ??? ?????? ???????? ??????? ?/?? ???????? ???? ????. ????? ??? ??????? ??? ????? ??? ??? ??????? ???? ?? ????? ???????? ????????? ?????? ????????? ????????.

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

  1. ?? Visual Basic? ?? ?????? ????? ???? (??? ????? Form1 ???? ???????).
  2. ???? ??? "????????" ?? ??????? ??????? ?? ?? ?????? ???? ???????? "?????? Microsoft Script 1.0".
  3. ????? ???? ???? Script (ScriptControl1) ? ???? ?? (????1) ?? ??? (Command1) ??? Form1 ". ????? ??????? ???? ?? ????? ?????? ??? TRUE. ?????? ??????? ????? ??? ????1 ???? ???? ????? ??????? 5 ???? ???? 60 ??.
  4. ?? ?????? ????????? ???????? ??????? ??? Form1:
          Private Sub Command1_Click()
            On Error Resume Next
            With ScriptControl1
              .Language = "VBScript"
              .AllowUI = True
              .AddCode Text1.Text
              .Run "Test"
            End With
            If Err Then
              MsgBox Err & " " & Error
              ListErrors ScriptControl1
            End If
          End Sub
    
          Private Sub ListErrors(S As ScriptControl)
            With S.Error
              Debug.Print "Number:", .Number
              Debug.Print "Source:", .Source
              Debug.Print "Desc:", .Description
              Debug.Print "Line: " & .Line, "Column: " & .Column
              Debug.Print "Text:", .Text
              Debug.Print "Help File:", .HelpFile
              Debug.Print "Help Context:", .HelpContext
              Debug.Print
            End With
          End Sub
    
    						
  5. ?? ?????? Form1 ?? ??? ???? ???????.
  6. ???? ???????? ????? ?????? ?? ???? ????:
          Sub Test
            MsgBox == "Hello World"
            Err.Raise 555, "Test", "Custom Error", "test.hlp", 5
          End Sub
    
    						
  7. ???? ??? ?? ?????. ????? ????? ???? ????? ?????? ?? ???? ??????? (??????? ?????? ?? ????? ???????? ??? ????? ???? ???? ???????? ????? ???? ???????):
          Number:       1002
          Source:       Microsoft VBScript compilation error
          Desc:         Syntax error
          Line: 2       Column: 16
          Text:         MsgBox == "Hello World"
          Help File:
    
          Help Context:  0
    
    						
  8. ????? == ?? ??? MsgBox ?? ???? ??? ?? ????? ??? ????.
  9. ???? MsgBox ??? ?? ????? "??? ???? 555". ???? "???? ???????" ??????:
          Number:       555
          Source:       Test
          Desc:         Custom Error
          Line: 3       Column: 8
          Text:
          Help File:    test.hlp
          Help Context: 5
    
    						
    ??????: ?? ????? ????? ???? ???????? ??? ?? ??? ??? ???? ???? ?????? ????????? ???????? ?? ????? ?? ?????? ??? ?????? ?????.

?????

?????? ??? ?????? ????? "???????": ?????? ???

?????? ??? ??????? ??? ????? ?????? ??? ?????? Script ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
184739: INFO: ???? ?????? ??? ?????? ?? ???????? ?????

(?) 1998 ???? Microsoft ? ???? ???? ?????. ????????? ?????? Malcolm Stewart ? ???? Microsoft

???????

???? ???????: 184742 - ????? ??? ??????: 25/????? ??????/1425 - ??????: 3.1
????? ???
  • Microsoft Visual Basic 5.0 Learning Edition
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 4.0 Standard Edition
  • Microsoft Visual Basic 4.0 Professional Edition
  • Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
  • Microsoft Visual Basic for Applications 5.0
????? ??????: 
kbmt kbgrpdsvb kbhowto kbscript kbvbp KB184742 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????184742

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

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com