ViSiToR
Цитата:
Ой, а я и забыл пример показать офисного ассистента с чекбоксами
Может кому понадобится.
Код:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objXL = CreateObject("Excel.Application")
objXL.Workbooks.Add
objXL.Visible = False
objXL.Assistant.Visible = True
With objXL.Assistant
.Reduced = True
.Left = 600
.Top = 600
.MoveWhenInTheWay = True
End With
Set Balloon = objXL.Assistant.NewBalloon
Balloon.Heading = "Title"
Balloon.Text = "Select please"
Balloon.CheckBoxes(1).Text = "checkbox 1"
Balloon.CheckBoxes(2).Text = "checkbox 2"
Balloon.CheckBoxes(3).Text = "checkbox 3"
Balloon.CheckBoxes(4).Text = "checkbox 4"
Balloon.Show
If Balloon.CheckBoxes(1).Checked Then Wscript.Echo "You select checkbox 1."
If Balloon.CheckBoxes(2).Checked Then Wscript.Echo "You select checkbox 2."
If Balloon.CheckBoxes(3).Checked Then Wscript.Echo "You select checkbox 3."
If Balloon.CheckBoxes(4).Checked Then Wscript.Echo "You select checkbox 4."
objXL.quit
Wscript.Quit
Цитата:
Это как, можно пример?
Ой, а я и забыл пример показать офисного ассистента с чекбоксами
Может кому понадобится.
Код:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objXL = CreateObject("Excel.Application")
objXL.Workbooks.Add
objXL.Visible = False
objXL.Assistant.Visible = True
With objXL.Assistant
.Reduced = True
.Left = 600
.Top = 600
.MoveWhenInTheWay = True
End With
Set Balloon = objXL.Assistant.NewBalloon
Balloon.Heading = "Title"
Balloon.Text = "Select please"
Balloon.CheckBoxes(1).Text = "checkbox 1"
Balloon.CheckBoxes(2).Text = "checkbox 2"
Balloon.CheckBoxes(3).Text = "checkbox 3"
Balloon.CheckBoxes(4).Text = "checkbox 4"
Balloon.Show
If Balloon.CheckBoxes(1).Checked Then Wscript.Echo "You select checkbox 1."
If Balloon.CheckBoxes(2).Checked Then Wscript.Echo "You select checkbox 2."
If Balloon.CheckBoxes(3).Checked Then Wscript.Echo "You select checkbox 3."
If Balloon.CheckBoxes(4).Checked Then Wscript.Echo "You select checkbox 4."
objXL.quit
Wscript.Quit