Hey alles, was ich habe den folgenden Code, der wirft Spät Bindings. vb.net späte Bindungen Problem auch nach dem Setzen der Variablen
Ich dachte setzen:
Dim excelWS As Worksheet
excelWS = New Worksheet
Bevor die Variable mit dem späten Bindung Problem behoben?
UPDATE 1
Wäre es so etwas wie dieses?
Dim excelRange As Range
Dim excelApp As Application
Dim excelWB As Workbook
Dim excelWS As Worksheets
excelWB = New Workbook
If madeSheet = False Then
excelApp = New Application
excelWB = excelApp.Workbooks.Add
excelApp.Visible = True
End If
excelWS = New Worksheet
UPDATE 2
Auf dieser Linie jetzt:
excelWS = excelWB.Worksheets.Add(After:=excelWB.Worksheets(sheetLoops))
ich den Fehler bin immer:
Additional information: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel.Worksheets'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208B1-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
seine vb.net. Warum verweisen Sie nicht auf Microsoft.Office.Interop.Excel von Imports und verwenden 'CreateObject'? – jonathana
@jonathana mind geben ein Codebeispiel? – StealthRT
kein Problem, ist es möglich, Ihren Code als Text und nicht als Bild hinzuzufügen? – jonathana