Jimbo99999
asked on
VB.Net - Excel Formatting Issue From VB6 Conversion
Good Day Experts!
I am having an issue when the formatting routine executes against the Excel spreadsheet that is created by this application. It is a VB6 program that I ran the conversion on. I have not made any code changes to this formatting routine.
Here is the line thatI am getting the error on:
If exlWS.Cells(x, 7) <> "" Then exlWS.Cells(x, 7) = CDec(exlWS.Cells(x, 7))
I attached the pop-up error message box.
Thanks,
jimbo99999
I am having an issue when the formatting routine executes against the Excel spreadsheet that is created by this application. It is a VB6 program that I ran the conversion on. I have not made any code changes to this formatting routine.
Here is the line thatI am getting the error on:
If exlWS.Cells(x, 7) <> "" Then exlWS.Cells(x, 7) = CDec(exlWS.Cells(x, 7))
I attached the pop-up error message box.
Thanks,
jimbo99999
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, that got me past the first part and now on the ...Then exlWS.Cells(x, 7) = CDec(exlWS.Cells(x, 7)) I get an error:
Conversion from type 'Range' to type 'Decimal' is not valid.
Conversion from type 'Range' to type 'Decimal' is not valid.
Again, try CDec(exlWS.Cells(x, 7).ToString)
Arun
Arun
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Working now...thanks.
Arun