Set Range on ThisWorkBook problem.

  • Thread starter Thread starter Cesar Zapata
  • Start date Start date
C

Cesar Zapata

I get an error whe trying to set a range on the thisworkbook.range


dim lcolumn as string

lcolumn =
ThisWorkbook.Worksheets(2).Range("IV1").End(xlToLeft).Offset(0,
1).Column

Set myrange = Range(ThisWorkbook.Worksheets(2).Cells(1, 24),
ThisWorkbook.Worksheets(2).Cells(1, lcolumn))

TIA


CZ
 
First, lColumn should be a Long--or at least a number.

And second, when I changed that, your code worked ok.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top