Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Copy/Paste with Hidden Rows/Columns Excel 2007 Jayne Mae Excel Discussion (Misc queries) 3 January 28th 10 07:08 PM
Copy and Paste with hidden columns remaining hidden Pendelfin Excel Discussion (Misc queries) 2 February 26th 09 11:35 AM
Not include hidden columns in copy paste jbc Excel Discussion (Misc queries) 2 July 19th 07 01:46 AM
How do I copy a worksheet so that hidden columns remain secret? Vanessa Long Excel Discussion (Misc queries) 1 July 9th 07 01:42 PM
how do i copy formula down columns avoiding hidden cells PETE Excel Discussion (Misc queries) 1 October 14th 05 12:11 PM


All times are GMT +1. The time now is 04:05 PM.

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

About Us

"It's about Microsoft Excel"