Thread
:
resize method
View Single Post
#
2
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
resize method
Tim,
Is the UnitTemplate sheet active when you try to Resize and Select
the range? You can only select cells on the active sheet. Use
Worksheets("UnitTemplate").Activate
to activate the sheet before doing the Select.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Tim McPhillips" wrote in message
...
I have written the following code and I keep getting a run
time error 1004. Can anyone help?
Sub ResizeIT()
Dim range1 As Range
Dim range2 As Range
Set range1 = Worksheets("UnitTemplate").Range("CS7")
Set range2 = range1
Range("range1").Resize(, 3).Select
Selection.EntireColumn.Insert
End Sub
I am just trying to insert some columns based on a set
range address.
Tim McPhillips
Reply With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson