i have made global string constants for ranges.
Global Const Graph_Cl As String = "G2:G13"
Global Const Graph_Vl As String = "I2:I13"
Global Const Graph_VlS As String = "L2:L13"
i want to clear these ranges using a single line of code.
With wkDataToUse
.Range(Graph_Cl, Graph_Vl, Graph_VlS).ClearContents
End With
but i get error:
"Wrong no of arguments or invalid property assignment!"
i even tried this:
With wkDataToUse
.Range(Array(Graph_Cl, Graph_Vl, Graph_VlS)).ClearContents
End With
OR
With wkDataToUse
.Range([{Graph_Cl, Graph_Vl, Graph_VlS}]).ClearContents
End With
how can i clear all the ranges in one line of code?