View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Eric[_27_] Eric[_27_] is offline
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