Below is the Excel vba code that is trying to print the number of columns of the range specified in a row. I get an error in the debug.print section. What am I doing wrong?
Dim val1a As String val1a = "A1:D1" Dim Rng1 As Range Debug.Print Rng1(var1a).Columns.Count ' error here
source share