Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default copy data from a hidden column to another sheet

Hi,
I have used code from Ron De Bruin which will copy entire rows that meet a
specific criteria to another worksheet.
This works really well unless there are hidden columns in the source sheet.
How can I unhide column E (in my case) before the copying part of the code
starts?

Here's the beginning of the code:

Sub Copy_Complete()

Dim My_Range As Range
Dim DestSh As Worksheet
Dim CalcMode As Long
Dim ViewMode As Long
Dim FilterCriteria As String
Dim CCount As Long
Dim rng As Range
Dim My_Range1 As Range

Set My_Range = Range("D3:BD" & LastRow(ActiveSheet))
My_Range.Parent.Select

'Set the destination worksheet
Set DestSh = Sheets("complete")

'Change ScreenUpdating, Calculation, EnableEvents, ....
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
.EnableEvents = False
End With
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
ActiveSheet.DisplayPageBreaks = False

'Firstly, remove the AutoFilter
My_Range.Parent.AutoFilterMode = False

'Filter and set the filter field and the filter criteria

My_Range.AutoFilter Field:=47, Criteria1:="=P"

And off it goes!

Can I insert a line or two which will:
unhide column E
then continue with the copying over
re-hide column E

tia
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default copy data from a hidden column to another sheet

Try:

My_Range.Worksheet.Columns(5).Hidden = False

to reveal and:

My_Range.Worksheet.Columns(5).Hidden = True

to hdie again.

Chrisso



On 16 Sep, 15:44, Jock wrote:
Hi,
I have used code from Ron De Bruin which will copy entire rows that meet a
specific criteria to another worksheet.
This works really well unless there are hidden columns in the source sheet.

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 hidden sheet data Atiq Excel Discussion (Misc queries) 2 January 27th 10 08:41 PM
Copy Data from one sheet to many based on column A Steve[_4_] Excel Programming 7 March 24th 08 06:32 PM
Copy hidden sheet and then make copy visible HELP? [email protected] Excel Programming 5 August 7th 07 02:31 PM
VB copy paste column data to another left to right sheet across sh baz Excel Programming 2 April 23rd 06 09:37 AM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Dick Kusleika[_3_] Excel Programming 2 January 21st 04 04:39 PM


All times are GMT +1. The time now is 12:32 AM.

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"