I have an excel workbook which downloads historical stocks price data.
The VBA code has been working without any problems for at least couple of years.
Today I get error message: Run-time error “1004” - Unable to set the NumberFormat property of the Range class
part of VBA code as it follows below:
Set myRange = ThisWorkbook.Worksheets("Control").Range("ControlExtractDataNumberHeading")
Set myRange = Range(myRange, myRange.Offset(0, intYPEAdjustedClosePrice - 3))
Set myRange = Range(myRange, myRange.End(xlDown))
myRange.NumberFormat = Application.International(xlCurrencyCode) & "#,##0.00" - ERROR MESSAGE AT THIS STEP!!!
myRange.Value = myRange.Value2
I'm using Microsoft Office Professional Plus 2016
Windows 10
Thanks in advance for suggestions.
The VBA code has been working without any problems for at least couple of years.
Today I get error message: Run-time error “1004” - Unable to set the NumberFormat property of the Range class
part of VBA code as it follows below:
Set myRange = ThisWorkbook.Worksheets("Control").Range("ControlExtractDataNumberHeading")
Set myRange = Range(myRange, myRange.Offset(0, intYPEAdjustedClosePrice - 3))
Set myRange = Range(myRange, myRange.End(xlDown))
myRange.NumberFormat = Application.International(xlCurrencyCode) & "#,##0.00" - ERROR MESSAGE AT THIS STEP!!!
myRange.Value = myRange.Value2
I'm using Microsoft Office Professional Plus 2016
Windows 10
Thanks in advance for suggestions.