Code Working in VB 2013 And Not Working in VB 2019?

0

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.

excel
vb.net
asked on Stack Overflow Jul 10, 2020 by Meho2016 • edited Jul 10, 2020 by GSerg

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0