Salve a tutti,
sto convertendo un programma scritto in vb 6 in .net ed ho il seguente problema.
in vb 6 ho l'istruzione
set xlsheet=ExcelMgr.GetSheet("Foglio1")
con
dim xlsheet as Excel.Worksheet
dim ExcelMgr as New ExcelManager
dim xlwbBook As Excel.Workbook
Public Function GetSheet(FOGLIO As String) As Excel.Worksheet
On Error GoTo errHandler
Set GetSheet = xlwbBook.Worksheets(FOGLIO)
Exit Function
errHandler:
Set GetSheet = Nothing
End Function
quando vado ad eseguire la set xlsheet.. il compilatore mi dice che non è possibile associare un range ad xlsheet.
come devo procedere?

Rispondi quotando