Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
This does not work:
Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
It seems to be xlPasteColumnWidths.
Mike F "SteveC" wrote in message ... This does not work: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
ah, thanks
"Mike Fogleman" wrote: It seems to be xlPasteColumnWidths. Mike F "SteveC" wrote in message ... This does not work: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
SteveC, did you ever get a good answer to your question? I've been hunting
for an answer to this myself. I found that if you record a macro where you cut and PasteSpecial the column widths, the CODE GENERATED BY EXCEL generates a "Variable not defined" error referring to xlColumnWidths when I try to run it again! How can code generated by Excel's own macro recorder, contain errors? It's baffling! "SteveC" wrote: ah, thanks "Mike Fogleman" wrote: It seems to be xlPasteColumnWidths. Mike F "SteveC" wrote in message ... This does not work: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
Excel 2000 ?
There is a bug in the version I always use the numner 8 PasteSpecial 8 Working in all Excel versions Same problem for validation as far as I know (use 6 for that) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm " wrote in message ... SteveC, did you ever get a good answer to your question? I've been hunting for an answer to this myself. I found that if you record a macro where you cut and PasteSpecial the column widths, the CODE GENERATED BY EXCEL generates a "Variable not defined" error referring to xlColumnWidths when I try to run it again! How can code generated by Excel's own macro recorder, contain errors? It's baffling! "SteveC" wrote: ah, thanks "Mike Fogleman" wrote: It seems to be xlPasteColumnWidths. Mike F "SteveC" wrote in message ... This does not work: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste Column Width Language
Holy cow, it works! Thanks a lot.
"Ron de Bruin" wrote: Excel 2000 ? There is a bug in the version I always use the numner 8 PasteSpecial 8 Working in all Excel versions Same problem for validation as far as I know (use 6 for that) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm " wrote in message ... SteveC, did you ever get a good answer to your question? I've been hunting for an answer to this myself. I found that if you record a macro where you cut and PasteSpecial the column widths, the CODE GENERATED BY EXCEL generates a "Variable not defined" error referring to xlColumnWidths when I try to run it again! How can code generated by Excel's own macro recorder, contain errors? It's baffling! "SteveC" wrote: ah, thanks "Mike Fogleman" wrote: It seems to be xlPasteColumnWidths. Mike F "SteveC" wrote in message ... This does not work: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").PasteSpeci al xlColumnWidths But this does: Workbooks("Hot List.xls").Sheets("Snapshot").Cells.Copy ThisWorkbook.Sheets(ShName).Range("A1").Select Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False is the command in the first code excerpt not xlColumnWidths? thanks... Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Cell Width WITHOUT changing Column width | Excel Discussion (Misc queries) | |||
How to make cell width different than the column width it lies in | Excel Discussion (Misc queries) | |||
Set Column Width Based On Total Width Of Other Columns | Excel Programming | |||
copy paste (column width prb) | Excel Programming |