Toggle Font Style Macro

G

GK80535

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()

??????
 
F

Frank Kabel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top