D
David McRitchie
I've often seen postings relating to Buttons concerning Taking Focus
but now in trying to find out why I need Selection.Select to get
a macro to work. I ran across several postings mentioning
"Taking Focus" while searching the Google groups archives on
"selection.select", so I guess I need a clear understanding
of what this really means.
I created a macro to simulate the Format Painter which can resize
it's output to match the selection of the destination rather than the
dimension of the source. The resizing only occurs by including
selection.select
otherwise you must choose 1 cell, or a matching dimension for the
destination. More complete description and examples in
http://www.mvps.org/dmcritchie/excel/paste.htm#painter
Sub PasteSpecialFormats()
'David McRitchie, paste.htm, programming, 2003-07-08
Selection.Select 'makes it work like the Format Painter
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Can someone tell me what taking focus means here. Without the
selection.select what has the focus.
but now in trying to find out why I need Selection.Select to get
a macro to work. I ran across several postings mentioning
"Taking Focus" while searching the Google groups archives on
"selection.select", so I guess I need a clear understanding
of what this really means.
I created a macro to simulate the Format Painter which can resize
it's output to match the selection of the destination rather than the
dimension of the source. The resizing only occurs by including
selection.select
otherwise you must choose 1 cell, or a matching dimension for the
destination. More complete description and examples in
http://www.mvps.org/dmcritchie/excel/paste.htm#painter
Sub PasteSpecialFormats()
'David McRitchie, paste.htm, programming, 2003-07-08
Selection.Select 'makes it work like the Format Painter
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Can someone tell me what taking focus means here. Without the
selection.select what has the focus.