View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default Variable in range

Maybe just another option:

Dim x As Long
x = Range("B6").Value
Rows(1).Resize(x).Insert

HTH
Dana DeLouis

"morry " wrote in message
...
Can a variable be put into a range? If so could somebody tell me what
is wrong with this code. (Cell B6 hold a numeric value.)

Dim x As Range

x = Range("B6").Value

Rows("1:x").Select
Selection.Insert Shift:=xlDown

Thank you for the help

Morry


---
Message posted from http://www.ExcelForum.com/