Hello: I've counted rows in file1 and want to insert 2.25 rows in file2. Everything is fine until row insert statement. I get the error:
Insert method of range class failed.
I've tried a ton of other iterations and can't get it to work.
Any help would be greatly appreciated!
Insert method of range class failed.
I've tried a ton of other iterations and can't get it to work.
Any help would be greatly appreciated!
Code:
Dim wb as Workbook
Set wb = Workbooks("File1.xlsm")
Dim RowCount As Long
RowCount = wb.Worksheets("New Sheet").Range("B6").CurrentRegion.Rows.Count
Dim wb2 As Workbook
Set wb2 = Workbooks("File2.xlsm")
wb2.Worksheets("Data").Range("C10").EntireRow.Resize(RowCount * 2.25).Insert Shift:=xlUp