Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy hidden sheet data | Excel Discussion (Misc queries) | |||
Copy Data from one sheet to many based on column A | Excel Programming | |||
Copy hidden sheet and then make copy visible HELP? | Excel Programming | |||
VB copy paste column data to another left to right sheet across sh | Excel Programming | |||
Saving hidden data with a worksheet (preferably without using a hidden sheet) | Excel Programming |