This code has been working for ages. I thought maybe I accidently pressed a key but I cannot seem to see it. I suddenly get the error:
Unable to set the NumberFormat property of the Range class
in the below code:
Worksheets("Sheet1").Cells(y + k, x + j).Select
TempValue = Worksheets("Sheet1").Cells(y + k, x + j).Value
Worksheets("Sheet1").Cells(y + k, x + j).NumberFormat = "#,##0" //ERROR HERE
Worksheets("Sheet1").Cells(y + k, x + j).Value = TempValue
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…