View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Select Case Question

You need to use SET

Set Rng1 = ThisWorkbook.Sheets("Sheet1").Range("A1")

Cheers
Andy

Craig wrote:
Thanks to all who replied, JNW, I wrote your piece of code into my workbook
but it gace an error called Object Variable or With block variable not set.
When I clicked debug it highlighted this line

Rng1 = ThisWorkbook.Sheets("Sheet1").Range("A1")

Any ideas why it would do this?

Cheers


Craig


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info