Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Union Function
I am trying to combine data on two different sheets in the same workbook
using the following command: Set Union_sh = Application.Union(Sheets("BSPL+"), Sheets("Other OMI")) For some reason this won't work and I cannot understand why. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Union Function
First, the Union method requires Range object arguments, not Sheet
objects. Second, the Union method returns a Range object, which is a child object of a Sheet. You can't have a Range Object that has two parent (sheet) objects. In article , NutoVBA wrote: I am trying to combine data on two different sheets in the same workbook using the following command: Set Union_sh = Application.Union(Sheets("BSPL+"), Sheets("Other OMI")) For some reason this won't work and I cannot understand why. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Union Function
Do you have any ideas on how to identify a sheet as a Range?
"JE McGimpsey" wrote: First, the Union method requires Range object arguments, not Sheet objects. Second, the Union method returns a Range object, which is a child object of a Sheet. You can't have a Range Object that has two parent (sheet) objects. In article , NutoVBA wrote: I am trying to combine data on two different sheets in the same workbook using the following command: Set Union_sh = Application.Union(Sheets("BSPL+"), Sheets("Other OMI")) For some reason this won't work and I cannot understand why. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Union Function
Sheet Objects and Range Objects are not, and cannot be made equivalent.
You can return a range object consisting of all cells on a sheet with Sheets("Sheet1").Cells In article , NutoVBA wrote: Do you have any ideas on how to identify a sheet as a Range? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error using 'Union' | Excel Programming | |||
Union | Excel Programming | |||
union/disunion? | Excel Programming | |||
Union only works for sometimes. | Excel Programming | |||
Excel's range Union operator in WORKDAY function gives #VALUE!. | Excel Programming |