Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey Garry,
Within this snippet of code: With wksTarget .Rows("1:" & CStr(.UsedRange.Rows.Count)).ClearContents .Rows("1:" & CStr(.UsedRange.Rows.Count)).ClearComments .Rows("1:" & CStr(.UsedRange.Rows.Count)).Interior.ColorIndex = xlNone End With With wksSource columnfilter.EntireColumn.AutoFilter Field:=1, Criteria1:="Y" .UsedRange.Copy wksTarget.Range("1:1").PasteSpecial Paste:=xlPasteColumnWidths .UsedRange.Copy wksTarget.Range("1:1") '//put the data .Columns("K:K").AutoFilter End With When I copy rows based on the autofilter, it appears that by using "usedrange" I am ommitting hidden columns. IS there a way to include hidden columns in the copy/paste as well? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try...
With wksSource .Activate .RngToFilter.EntireColumn.AutoFilter Field:=1, Criteria1:="Y" .UsedRange.Select: Selection.Copy With wksTarget.Range("1:1") .PasteSpecial Paste:=xlPasteColumnWidths .PasteSpecial Paste:=xlPasteValues End With .RngToFilter.EntireColumn.AutoFilter End With -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofilter based on user inputbox | Excel Programming | |||
Autofilter based on user input? | Excel Programming | |||
user difined inputbox | Excel Programming | |||
allow user to change workbook while in Msgbox or InputBox | Excel Programming |