Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function

Hi all:

I've got a question regarding Ron de Bruin's function "GetRange" in the
"Copy a range from closed workbook" examples at the following link:

http://www.rondebruin.nl/copy7.htm

In the GetRange function, a statement attempts to resize a destination
range with the range of the source range. However, at the point it tries to
do this, the source range hasn't been identified. The source file isn't
even opened.

Any suggestions on how to get around this problem?

Thanks!

Jon

P.S. Sorry if this is a repost; I sent this out hours ago and it hasn't
shown up yet, so I thought I'd err on the side of caution and resend it.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function


Have you tried using the code and received an error? If so what error?
Have you used Ron's example codes whilst changing the relevant
variables?


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site
' (http://www.excel-it.com)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=31447

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function

Hi Roy, Ron, et al.:

Have you tried using the code and received an error? If so what error?
Have you used Ron's example codes whilst changing the relevant
variables?


Yes, I've tried the code. The error I get indicates that the Range
fails on the _Global object.

However, I believe I figured out part of my problem. I was specifying a
named range from the source file when I really needed to specify an actual
range. Once I did that, the aforementioned error went away.

But, now I have two more problems! :(

First, I am trying to copy a range of 8 rows, 1 column wide. The
values, in order, a

A, B, C, , , , , X

However, when they paste, a 0 (zero) replaces the blanks. And, try as I
might, I cannot get blanks to be pasted in.

Second, I have two situations where I need to copy the entire contents
of one closed worksheet into a sheet in my open workbook. Is there a way to
specify a range generically that will let me do this?

Thanks!

Jon


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function

Opening the workbook with code give you much more control
and most of the time fast.

If you need help with the code post back

This page give you a start
http://www.rondebruin.nl/copy3.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JonWestcot" wrote in message ...
Hi Roy, Ron, et al.:

Have you tried using the code and received an error? If so what error?
Have you used Ron's example codes whilst changing the relevant
variables?


Yes, I've tried the code. The error I get indicates that the Range
fails on the _Global object.

However, I believe I figured out part of my problem. I was specifying a
named range from the source file when I really needed to specify an actual
range. Once I did that, the aforementioned error went away.

But, now I have two more problems! :(

First, I am trying to copy a range of 8 rows, 1 column wide. The
values, in order, a

A, B, C, , , , , X

However, when they paste, a 0 (zero) replaces the blanks. And, try as I
might, I cannot get blanks to be pasted in.

Second, I have two situations where I need to copy the entire contents
of one closed worksheet into a sheet in my open workbook. Is there a way to
specify a range generically that will let me do this?

Thanks!

Jon


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function

Hi Ron:

Thanks for the uber-fast reply! And thanks for the link. I'll try
switching things around to opening up the external files manually and see if
that helps.

Do you have any idea, though, why the blank cells were replaces with
zeroes?

Thanks again.

Jon

"Ron de Bruin" wrote in message
...
Opening the workbook with code give you much more control
and most of the time fast.

If you need help with the code post back

This page give you a start
http://www.rondebruin.nl/copy3.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JonWestcot" wrote in message

...
Hi Roy, Ron, et al.:

Have you tried using the code and received an error? If so what error?
Have you used Ron's example codes whilst changing the relevant
variables?


Yes, I've tried the code. The error I get indicates that the Range
fails on the _Global object.

However, I believe I figured out part of my problem. I was

specifying a
named range from the source file when I really needed to specify an

actual
range. Once I did that, the aforementioned error went away.

But, now I have two more problems! :(

First, I am trying to copy a range of 8 rows, 1 column wide. The
values, in order, a

A, B, C, , , , , X

However, when they paste, a 0 (zero) replaces the blanks. And, try

as I
might, I cannot get blanks to be pasted in.

Second, I have two situations where I need to copy the entire

contents
of one closed worksheet into a sheet in my open workbook. Is there a

way to
specify a range generically that will let me do this?

Thanks!

Jon






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default A Question on Ron de Bruin's "Copy a range from closed workbook" function

We create formula links in this example first and then convert it to values.
That's why the zero.

You can hide zeros if you want
ToolsOptions..View
See zero values

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JonWestcot" wrote in message ...
Hi Ron:

Thanks for the uber-fast reply! And thanks for the link. I'll try
switching things around to opening up the external files manually and see if
that helps.

Do you have any idea, though, why the blank cells were replaces with
zeroes?

Thanks again.

Jon

"Ron de Bruin" wrote in message
...
Opening the workbook with code give you much more control
and most of the time fast.

If you need help with the code post back

This page give you a start
http://www.rondebruin.nl/copy3.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JonWestcot" wrote in message

...
Hi Roy, Ron, et al.:

Have you tried using the code and received an error? If so what error?
Have you used Ron's example codes whilst changing the relevant
variables?

Yes, I've tried the code. The error I get indicates that the Range
fails on the _Global object.

However, I believe I figured out part of my problem. I was

specifying a
named range from the source file when I really needed to specify an

actual
range. Once I did that, the aforementioned error went away.

But, now I have two more problems! :(

First, I am trying to copy a range of 8 rows, 1 column wide. The
values, in order, a

A, B, C, , , , , X

However, when they paste, a 0 (zero) replaces the blanks. And, try

as I
might, I cannot get blanks to be pasted in.

Second, I have two situations where I need to copy the entire

contents
of one closed worksheet into a sheet in my open workbook. Is there a

way to
specify a range generically that will let me do this?

Thanks!

Jon




Reply
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
Protect "Copy" and "Save As" changes to workbook Jason W Excel Discussion (Misc queries) 3 January 4th 09 01:13 AM
can I copy "2" different Ranges from closed workbook (VBA) DarnTootn Excel Programming 9 January 18th 08 04:03 PM
Modifying Ron De Bruin's "Create summary sheet from different workbooks" Greg[_37_] Excel Programming 7 May 20th 07 11:47 AM
Question on determining "ROW" inside of a "For .. RANGE " loop David Schrader[_2_] Excel Programming 2 January 3rd 07 08:18 PM


All times are GMT +1. The time now is 02:07 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"