????? ??????? UserForm ???????

?????? ????????? ?????? ?????????
???? ???????: 185774 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ????? ???? ??????? ?? Microsoft Office 97 ?? Windows ????? ???? ???? ???? (UserForm) ???????? Microsoft Visual Basic ????????? ???????.

????? ??? ??????? ??? ????? ????????? ???????? ?? Visual Basic ???? ???? ?????? ????? ???? ???? ???? ???????? ???? ???? ?????.

??????? ????

???? ?????? Visual Basic ?? Microsoft Office 97 ???????? ????????? ???? ????? ??? ?????? ?????? Visual Basic ???????? ?????? ???. ???????? ??? ??????? ?????? ???? ????? ?????? Visual Basic ?? ???? VBE. VBE ?? ?????? ????? ???? ????? ??? ???? ?????? ?????? ???????? ????? ?? Visual Basic for Applications. ????? ?????? ?? ?????? VBE ???? ???? ???????. ????? ???? VBE ?????? VBProject ????? ???? ???? ???????? ???????? ?? ???? ???????.

????? ?? ??????? ????? ??? ???? VBProject ???? ??? ??? ??????? ????? ?? ?? ???? ????.

????? ?????? VBProject ??? ?????? VBComponents. ???? ??? ????? ?????? ???? UserForms ? ??????? UserForm. UserForm ?????? ? ??????? ??????? ???????? ???????? ????? ?????? VBComponents.

Microsoft Visual Basic for Applications ????? ?????? ???????? ???????

????????? ???????? Visual Basic ??????? ?? ??? ??????? ??? ?????? ? ????? ????? ????? ?????? "Microsoft Visual Basic ?? ??????? ???????" ?? ???????. ?????? ??? ?????? Microsoft Excel ???? ??????? ????? ??? ?? ?????? Microsoft Office. ?????? ???? ??? ????? "Microsoft Visual Basic ?? ??????? ???????" ??? ??????? ???? ??????? ???????:

  1. ??? ????? Microsoft Excel ?? ?? ?????? ???? ????.
  2. ???? ALT + F11 ???? ???? Visual Basic.
  3. ?? ???? ??? ???? ???? Project ???? ??? Project Explorer ?? ??????? ???.
  4. ?? ???? Project? ???? ??? "VBAProject (Book1)."

    ???? ??? ?? ????? ??? ??????.
  5. ?? ??????? ????? ???? ??? ???? ?????.

    ???? ??? ?????? ???? ????? ?? ????? Book1.
  6. ?? ??????? ????? ? ???? "?????".
  7. ??? "??????? ???????", ???? ??? "Microsoft Visual Basic ?? ??????? ???????" ?? ???? ??? ?????.
??? ????? ??????? ??????? ????? ????? ???????? ???????? ???????? Visual ???? ???? ?? ??? ??????? ?? ???? ????? ????? ??? ?? ????? ???????.

?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
173707OFF97: ????? ????? ????? ?????? ?????? ?? ?????? ????? ???????

??????? ??? ??? ???????? Visual Basic

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

Microsoft ????????? Partners ? https://partner.microsoft.com/global/30000104

????? Microsoft ??????? ???? ???? ??????? - http://support.microsoft.com/gp/advisoryservice

?????? ??? ???? ?? ????????? ??? ?????? ????? ???????? ???? ????? ??????? ????? Microsoft ?? ?????? ???? Microsoft ?????? ??? ?????: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS?????? ??? ??????? ??????? ? ??????? ??????? ????? ? UserForms ???? ?? ??????? ????? ?? ???? ????? ???? ???????? ???????? ??????? ?? ?????? ??????? ????:
     Sub Count_VBComponents1()

      MsgBox Application.VBE.ActiveVBProject.VBComponents.Count

   End Sub
				
?? ??????? ????????? ???????? ???????:
    Sub Count_VBComponents2()

      ' Replace "ActiveWorkbook" with "ActiveDocument" for Microsoft Word
      ' or "ActivePresentation" for Microsoft PowerPoint.
      MsgBox ActiveWorkbook.VBProject.VBComponents.Count

   End Sub
				

????? UserForm ????

?????? UserForm ???? ??????? ??????? Add VBComponents ?????? ??? vbext_ct_MSDForm. ??? ???? ??????? ???? ???????? ???????? ??????? ?? ?????? ??????? ????:
      Sub Add_Form1()

      ' Declare a variable to hold the UserForm.
      Dim x As Object

      ' Create a new UserForm. You can use this new VBComponent object
      ' to manipulate the User Form.
          Set x = Application.VBE.ActiveVBProject.VBComponents.Add _
          (vbext_ct_MSForm)

   End Sub
				

????? ????? ???????? ?????? ?? UserForm

?????? ??? UserForm ????? ?????? ?????? ?? ??? ???????. ????? ????? ????? ???? (??? ???? ??????? ????? ?? ?????? ?? ???) ? ??????? ???? ?????? ??????? VBComponent ??????. ?????? ?????? ????? UserForm ????? ?????? ?? ??? ??????? ????????? (???? ???? ???? ?? ???? ???????) ?????? ? ??? ???? ?????? ?? ?????? ??????:
  Sub Add_Form2()

      ' Declare a variable to hold the UserForm.
      Dim mynewform As Object

      ' Create a new UserForm. You can now use this new VBComponent object
      ' to manipulate the User Form.
      Set mynewform = _
      Application.VBE.ActiveVBProject.VBComponents.Add(vbext_ct_MSForm)

      With mynewform
         .Properties("Height") = 246
         .Properties("Width") = 616
         .Name = "HelloWord"
         .Properties("Caption") = "This is a test"
      End With

   End Sub
				

????? ????? ??? UserForm

?????? ???? ???? ???? ??? UserForm ????? ??????? ?????? ???? ?????? VBComponent ???????. ???? ???? ???? ?? ??????? ??????? UserForm. ???? ???? ????? ??? ????? ??????. ?????? ???? ???? ???? ?????? ??? ?????? ????? ??????. ?????? ?????? ???? ???? ???? ???? ?????? ??? UserForm ?? ?????? ?????? ????? ?????? ??? ??????? ????????? ???? ? ??? ???? ??????:
   Sub Add_Control()

      ' Declare variables.
      Dim mynewform As Object
      Dim mycheckbox As Object

      ' Create a new UserForm. You can use this new VBComponent object
      ' to manipulate the UserForm.
      Set mynewform = _
        Application.VBE.ActiveVBProject.VBComponents.Add (vbext_ct_MSForm)

      ' Add a checkbox to the new UserForm.
      Set myCheckBox = mynewform.Designer.Controls.Add("Forms.CheckBox.1")

      ' With the new checkbox...
      With myCheckBox
         .Name = "Check1"
         .Caption = "Check here"
         .Left = 10
         .Top = 10
         .Height = 20
         .Width = 60
      End With

   End Sub
				
?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
157319XL97: ????? ??? ??????? ????? ?????? ???? ?????? ??? UserForm

?????

?????? ??? ??????? ?????? ??? ?????? ??? ??????? Visual Basic for Applications ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
163435VBA: ????? ??????? Visual Basic ?????????

???????

???? ???????: 185774 - ????? ??? ??????: 02/?? ??????/1427 - ??????: 4.6
????? ???
  • Microsoft Office Excel 2003
  • Microsoft Excel 97 Standard Edition
  • Microsoft Word 97 Standard Edition
  • Microsoft PowerPoint 97 Standard Edition
????? ??????: 
kbmt kbdtacode kbhowto KB185774 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????185774

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

 

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