View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul D[_2_] Paul D[_2_] is offline
external usenet poster
 
Posts: 38
Default Resizing a Range

if you are trying to set a variable to a range object, you have to use set
before the variable name

Set MyRange = ThisWorkbook.Work...

Paul D

"NetWave128 " wrote in message
...
This line in my code keeps crashing it says:" Object Variable or With
block variable not set"

HERE IS THE LINE:


Dim MyRange as Range

MyRange =

ThisWorkbook.Worksheets("Sheet1").Range("a1").Curr entRegion.Resize(MyRange.R
ows.Count,
1)


Thank you for your help!


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