Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Toggle Font Style Macro


I'm not looking to save and restore the background color of th
selection. I'm looking to save and restore the font STYLE.

So, if the font style were red with italics, I want to save and restor
that. If it were blue and bold size 15, I want to save and restor
that.

Does anyone know a function that returns the current selection's fon
style? So, is there a function for which I could do this:

dim myVariable = returnStyleFunction()

??????

--
GK8053
-----------------------------------------------------------------------
GK80535's Profile: http://www.excelforum.com/member.php...fo&userid=1546
View this thread: http://www.excelforum.com/showthread.php?threadid=27213

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Toggle Font Style Macro

Hi
two ways:
1.Temporary variables
- either store ALL different font styles in temporay variables
- restore property by property afterwards
- saving these information can be done in the same way as I showed with
the background color :-)

2. Use a hidden sheet or a helper cell (e.g. cell IV1) where you copy
your formats with pastespecial and restore it from there. Drawback:
this restores all format information


--
Regards
Frank Kabel
Frankfurt, Germany


GK80535 wrote:
I'm not looking to save and restore the background color of the
selection. I'm looking to save and restore the font STYLE.

So, if the font style were red with italics, I want to save and
restore that. If it were blue and bold size 15, I want to save and
restore that.

Does anyone know a function that returns the current selection's font
style? So, is there a function for which I could do this:

dim myVariable = returnStyleFunction()

???????


Reply
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
Changing font style and color using VBA Spongie Excel Discussion (Misc queries) 3 September 30th 09 08:34 PM
Change the Font Style in VBA justme0010[_2_] Excel Discussion (Misc queries) 1 January 15th 08 04:07 AM
how do i get font style back on toolbar? melissa Excel Discussion (Misc queries) 2 July 18th 05 08:55 PM
Icon button - font/style cvgairport Excel Discussion (Misc queries) 1 December 2nd 04 12:51 AM
Toggle Font Style Macro GK80535[_2_] Excel Programming 2 October 25th 04 06:31 PM


All times are GMT +1. The time now is 11:17 AM.

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

About Us

"It's about Microsoft Excel"