LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Simulating the Format Painter, Selection.Select, and taking focus

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.
---
HTH, (using Excel 2000 and the OS is Windows 2000)
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show cell selection when excel not in focus + other questio Jim E Setting up and Configuration of Excel 1 September 27th 09 08:20 PM
Format painter maltagirl Excel Worksheet Functions 0 September 7th 09 06:56 PM
copy conditional format without using format painter MsConfused Excel Worksheet Functions 2 May 4th 09 07:16 AM
Format Painter Fay Excel Discussion (Misc queries) 1 March 14th 08 07:44 PM
how can I use the format painter?? hermosilla New Users to Excel 1 August 11th 06 11:56 PM


All times are GMT +1. The time now is 04:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"