Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
I need to copy a row from one worksheet to another, and am using this
statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
Copy will copy hidden columns/rows BUT the columns/rows to which the data is
copied will also be hidden on the destination sheet. -- Cheers Nigel "Eric" wrote in message nk.net... I need to copy a row from one worksheet to another, and am using this statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
Yes, I see that. Is there an easy way to unhide all cells in code (and not
affect the worksheet) before the paste? Thanks, Eric "Nigel" wrote in message ... Copy will copy hidden columns/rows BUT the columns/rows to which the data is copied will also be hidden on the destination sheet. -- Cheers Nigel "Eric" wrote in message nk.net... I need to copy a row from one worksheet to another, and am using this statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
With worksheets("Destination")
.Rows.Hidden = False .Columns.Hidden = False End With -- Regards, Tom Ogilvy "Eric" wrote in message nk.net... Yes, I see that. Is there an easy way to unhide all cells in code (and not affect the worksheet) before the paste? Thanks, Eric "Nigel" wrote in message ... Copy will copy hidden columns/rows BUT the columns/rows to which the data is copied will also be hidden on the destination sheet. -- Cheers Nigel "Eric" wrote in message nk.net... I need to copy a row from one worksheet to another, and am using this statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
Thanks Tom, I'm sure this works but it isn't for me for some reason, even
when I paste it into a new wkb where I wouldn't have to worry about any other date. A code snippet is below if that helps...maybe I'm just not putting into the right spot: ' insert a new row into history Dim sNextUpdateRowAddress As String sNextUpdateRowAddress = InsertNewRow(gclsEventHandler.TaskHistoryWks.Range (gsRNG_INSERT_ROW)) ' copy the current task to the new row. Dim sCurrentTaskAddress As String sCurrentTaskAddress = gclsEventHandler.CurrentTaskAddress Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) Isn't there some way to just make all the cells in my source row visible via code after they are copied? Much thanks, Eric "Tom Ogilvy" wrote in message ... With worksheets("Destination") .Rows.Hidden = False .Columns.Hidden = False End With -- Regards, Tom Ogilvy "Eric" wrote in message nk.net... Yes, I see that. Is there an easy way to unhide all cells in code (and not affect the worksheet) before the paste? Thanks, Eric "Nigel" wrote in message ... Copy will copy hidden columns/rows BUT the columns/rows to which the data is copied will also be hidden on the destination sheet. -- Cheers Nigel "Eric" wrote in message nk.net... I need to copy a row from one worksheet to another, and am using this statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
COPY - *want* to include hidden columns
sure. Unhide the hidden columns in the worksheet where you want them
unhidden. Hidden is a property of an entirerow (for row height) and for an entirecolumn (for column width). You can't hide and unhide an individual cell. -- Regards, Tom Ogilvy "Eric" wrote in message ink.net... Thanks Tom, I'm sure this works but it isn't for me for some reason, even when I paste it into a new wkb where I wouldn't have to worry about any other date. A code snippet is below if that helps...maybe I'm just not putting into the right spot: ' insert a new row into history Dim sNextUpdateRowAddress As String sNextUpdateRowAddress = InsertNewRow(gclsEventHandler.TaskHistoryWks.Range (gsRNG_INSERT_ROW)) ' copy the current task to the new row. Dim sCurrentTaskAddress As String sCurrentTaskAddress = gclsEventHandler.CurrentTaskAddress Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) Isn't there some way to just make all the cells in my source row visible via code after they are copied? Much thanks, Eric "Tom Ogilvy" wrote in message ... With worksheets("Destination") .Rows.Hidden = False .Columns.Hidden = False End With -- Regards, Tom Ogilvy "Eric" wrote in message nk.net... Yes, I see that. Is there an easy way to unhide all cells in code (and not affect the worksheet) before the paste? Thanks, Eric "Nigel" wrote in message ... Copy will copy hidden columns/rows BUT the columns/rows to which the data is copied will also be hidden on the destination sheet. -- Cheers Nigel "Eric" wrote in message nk.net... I need to copy a row from one worksheet to another, and am using this statement to do so: Application.Range(sCurrentTaskAddress).Copy Destination:=Application.Range(sNextUpdateRowAddre ss) where sCurrentTaskAddress represents the address of an entire row in the source wks. I could swear it was working as I'd expect it to, copying ALL the cells in the row whether some columns were hidden or not, but it's only copying visible cells. I thought you need to do Special(xlVisible) or something like that to get that behavior. Any help to let me copy everything, hidden or not, much appreciated as I need to get this done. Thanks, Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy/Paste with Hidden Rows/Columns Excel 2007 | Excel Discussion (Misc queries) | |||
Copy and Paste with hidden columns remaining hidden | Excel Discussion (Misc queries) | |||
Not include hidden columns in copy paste | Excel Discussion (Misc queries) | |||
How do I copy a worksheet so that hidden columns remain secret? | Excel Discussion (Misc queries) | |||
how do i copy formula down columns avoiding hidden cells | Excel Discussion (Misc queries) |