Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect "Copy" and "Save As" changes to workbook | Excel Discussion (Misc queries) | |||
can I copy "2" different Ranges from closed workbook (VBA) | Excel Programming | |||
Modifying Ron De Bruin's "Create summary sheet from different workbooks" | Excel Programming | |||
Question on determining "ROW" inside of a "For .. RANGE " loop | Excel Programming |