Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15567

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

$
0
0
I have a code which is working very well in VB.Net 2013 and the same code (Copy & Paste) is not working on VB.Net 2019 ???

I Receive Error "Invalid Index (Exception from HRESULT: 0X8002000B (DISP_E_BADINDEX))"

The Error only shows with this Line

Code:

Destination = CType(wb.Sheets(Diameter),Excel.Worksheet)
wb is the workbook 'Workbook

Destination is a variable Carrying New Worksheets 'Worksheet

Diameter is a Variable Carrying New Worksheets Names 'String

I wonder why it is working on 2013 and not working in 2019

Appreciate your support, Thanks.

Moheb Labib

Viewing all articles
Browse latest Browse all 15567

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>