View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Insert copied cells above hidden Named Range

Try this. Tested from another sheet where f6 was copied to the the cell
above the hiddencell. NO selections.

Sub copybeforehiddenrow()
Range("f6").Copy
Range("hiddencell").Insert shift:=xlDown
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Munchkin" wrote in message
...
I'm not sure what happened here - this worked in the past, but suddenly
there
is a problem with "Selection.Insert Shift:=xlDown".

The "record end" named range is still there, so it's not that. The marco
is
supposed to go to "RecordEnd" which is hidden, unhide it, insert the
copied
cells while pushing "RecordEnd" below the inserted cells. It worked
before -
anybody know what I'm doing wrong?

Sheets("DRIVER LIST").Select
Application.Goto Reference:="RecordEnd"
Selection.EntireRow.Hidden = True
Selection.Insert Shift:=xlDown
Application.Goto Reference:="RecordEnd"
Selection.EntireRow.Hidden = True
ActiveCell.Offset(-1).Activate