I have a code which is working very well in VB.Net 2013 and the same code (Copy & Paste) is not working in VB.Net 2019?
I receive error
Invalid Index (Exception from HRESULT: 0X8002000B (DISP_E_BADINDEX))
The Error only shows with this Line
Destination = CType(wb.Sheets(Diameter), Excel.Worksheet)
wb is a Workbook.
Destination is a variable holding new worksheets (Worksheet).
Diameter is a variable holding new worksheets names (String).
I wonder why it is working in 2013 and not working in 2019.
User contributions licensed under CC BY-SA 3.0