Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
When I record PasteSpecial operation as macro, I get a code like this: Range(RangeToCopy).Select Selection.Copy Range(RangeToPaste).Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False As I prefer to work wihout pouncing around with cursor, my code looks like this instead: Range(RangeToCopy).Copy Range(RangeToPaste).PasteSpecial Paste:=xlValues Range(RangeToPaste).PasteSpecial Paste:=xlFormats ' so long it works fine, but next row of code does fail Range(RangeToPaste).PasteSpecial Paste:=xlColumnWidths I think, that like with copying the validation, where I have to use an index 6 instead of optional variant's name , I need some index here too. Has someone some knowledge about this - in Excel Help I didn't find anything useful about this matter. Thanks in advance -- When sending mail, use address arvil<attarkon.ee Arvi Laanemets |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cut, Copy, Paste, PasteSpecial grayed out. | Excel Discussion (Misc queries) | |||
PasteSpecial | Excel Programming | |||
pastespecial in vba | Excel Programming | |||
listbox.Columnwidths question | Excel Programming | |||
Paste columnwidths in Xl2k problem | Excel Programming |