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




Reply With Quote

Bookmarks