LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
sgl sgl is offline
external usenet poster
 
Posts: 80
Default What am I doing wrong?

Hi All,
I am using Excel 2000 with Windows XP. I have the following code to capture
the actual range of cells

Range("A5",Range("G5").End(xlDown)).Select

This works well. Also the following works well.

Set sourceRange=mybook.worksheets(5).Range("A5").Curre ntRegion

In both the above instances the workbook in aopen and active.

Applying the same logic as follows does not work for me but gives me an
"Application or Object defined error". mybook is a closed Workbook.

Set sourceRange=mybook.Worksheets(5).Range("A5",Range( "G5").End(xlDown))

Any ideas what am I doing wrong.

Thanks in advance/sgl
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
Any wrong with this? Jo[_2_] Excel Discussion (Misc queries) 1 August 2nd 07 09:48 PM
What's wrong? Newbie Excel Programming 2 November 26th 04 01:47 PM
Am I doing something wrong here? TyeJae[_21_] Excel Programming 2 June 29th 04 12:56 AM
What is wrong?? willroy[_2_] Excel Programming 1 December 12th 03 01:33 PM


All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"