Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Column Width
Hello. I'm copying a range of cells with the code below to a different worksheet. How can I modify the code to also copy over the column widths from the source page? Thanks!
With wksSource .Columns("K:K").AutoFilter Field:=1, Criteria1:="Y" .UsedRange.Copy wksTarget.Rows("1:1") .Columns("K:K").AutoFilter End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Column Width
Steve has brought this to us :
Hello. I'm copying a range of cells with the code below to a different worksheet. How can I modify the code to also copy over the column widths from the source page? Thanks! With wksSource .Columns("K:K").AutoFilter Field:=1, Criteria1:="Y" .UsedRange.Copy wksTarget.Rows("1:1") .Columns("K:K").AutoFilter End With Try... With wksSource .Columns("K:K").AutoFilter Field:=1, Criteria1:="Y" .UsedRange.Copy wksTarget.Range("1:1").PasteSpecial xlPasteColumnWidths .UsedRange.Copy wksTarget.Range("1:1") '//put the data .Columns("K:K").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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I copy row height like i copy column width? | Excel Discussion (Misc queries) | |||
Copy Column width | Excel Discussion (Misc queries) | |||
Create a macro which takes a column name and width and sets the column width to what it should be | Excel Programming | |||
Copy column width along with data?? | Excel Discussion (Misc queries) | |||
copy paste (column width prb) | Excel Programming |