Type Mismatch - shape properties vs cells value
LYoong
0
Reputation points
Hiya, VBA is giving me type mismatch error when calculating value from excel range/cells value vs shape properties. Is there a way to resolve this error please?
Initially Range "A1" was a formula which I'd changed to a number (format cell as number too). By doing this the type mismatch error still there and it was highlighted at SclX = CapL / DimL
Appreciate for your help.
Dim SclX As Double
Dim DimL, CapL As Double
DimL = SheetName.Range("A1").Value
CapL = SheetName.Shapes.Range(Array("Rectangle 1")).Width
SclX = CapL / DimL
Sign in to answer