Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Set Range on ThisWorkBook problem.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cesar Zapata - 31 Jan 2006 21:03 GMT
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
Dave Peterson - 31 Jan 2006 22:35 GMT
First, lColumn should be a Long--or at least a number.

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

> I get  an error whe trying to set a range on the thisworkbook.range
>
[quoted text clipped - 10 lines]
>
> CZ

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.