Doevents notwendig bei Office-Fernsteuerung
PeterDoering
Gesendet: 19.11.22 10:25
Betreff: RE: Doevents notwendig bei Office-Fernsteuerung



Extreme Veteran

Beiträge: 563
5002525
Hallo,

Botti - 12.11.22 08:31
ist nicht ganz so easy.

Normalerweise würde ich sagen, schön modular aufgebaut, aber für die Fehlersuche ist es ein Albtraum. Probier mal, ob das funktioniert:

Sub TestExcel()
Dim objExcel As Object
Dim mySheet As Object
Dim objMappe As Object
Dim objSheet As Object

Set objExcel = CreateObject("Excel.Application")
Set objMappe = objExcel.Workbooks.Add
Set objSheet = objExcel.activeSheet

objSheet.Cells(1, 2) = "huhu"

objExcel.Visible = True

Set objSheet = Nothing
Set objMappe = Nothing
Set objExcel = Nothing

End Sub

Ganz ohne DoEvents und Klassen (wo ich dein Problem vermute).

-----
Gruss - Peter
Top of the page Bottom of the page