I'm having trouble with this piece of code. I'm getting an Overflow error. If I leave that part out, and don't delete row 1, everyting works. But I'd rather store the result as a value. I couldn't figure out how to do it using Worksheet.Function, so this is my workaround that's not working. I'd appreciate any help I can get. BTW I dimmed RowCt as an Integer.
![]()
With ActiveSheet If ActiveCell.Row = 1 Or Not IsEmpty(Range("A1")) Then .Rows(1).Insert ActiveCell.Offset(1, 0).Activate End If .Range("A1").FormulaR1C1 = "=COUNT('\\12aust1001fs01\share10011\Accounting\Z4116\Translation Services\[PAC 5.xlsx]PAC5G'!C6)+1" RowCt = .Range("A1").Value .Row(1).Delete End With
Bookmarks