Inserting Multiple Columns
Set r = Range("A:CQ")
__________________________________________________ _______________________
"NewToVB" wrote in message
...
I have two open worksheets and I'm trying to insert 3 columns into the
active
one. I'm using Visual Studio 2005, and excel 2007. I have this so far.
Dim r As Range
Dim r2 As Range
Dim r3 As Range
r = ("A:CQ") <---getting an error, string can't be converted
to
range
r(r.Columns.Count - 86).EntireColumn.Insert()
r2 = ("A:CR")
r2(r2.Columns.Count - 87).EntireColumn.Insert()
r3 = ("A:CS")
r3(r3.Columns.Count - 88).EntireColumn.Insert()
Any ideas? Thanks!
|