Zeigen Sie ein Dropdown- / Kombinationsfeld in VB Script an

Ich versuche, ein Dropdown- / Kombinationsfeld in VB Script zu erstellen. Nach meinem Verständnis müssen wir eine Instanz für den Internet Explorer erstellen und ein Dropdown- / Kombinationsfeld erstellen, etwa so:

  set oIE = createObject("InternetExplorer.Application")
  with oIE
    .Navigate "about:blank"
    Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
    set oDoc = .document
    .Visible = true
  end with

  with oDoc
    .open
    .writeln "<html><head><title>ComboBox Example</title></head>"
    .writeln "<body scroll=no><object "
    .writeln "classid=clsid:8BD21D30-EC42-11CE-9E0D-00AA006002F3"
    .writeln "id=ComboBox1 width=400></object><p>"
    .writeln "</body></html>"
    .close
    Do until .ReadyState = "complete" : WScript.Sleep 100 : Loop
    set oComboBox1 = .all.ComboBox1

  end with

  with oComboBox1
    .List = Array("One", "Two", "Three", "Four")
    .AutoWordSelect = true
    .focus
  end with
  oDoc.parentWindow.opener = "Me"

  bClosing = false

  on error resume next
  do until bclosing: wsh.sleep 100 : loop
  oIE.quit

  sub Closing : bClosing = True : end sub

Ist es möglich, ein Dropdown- / Kombinationsfeld ohne IE zu erstellen, ähnlich wie bei Message Box oder Input Box?

Antworten auf die Frage(1)

Ihre Antwort auf die Frage