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

Hi Excel Experts and Users,

Excel 2002 SP3

Is there a way to type a string into a cell and run a macro that will
produce an example of the Excel fonts using the string text?

So, if I enter DESPERADO in A1, I get an example of all available fonts of
desperado in A2 through A??.

Thanks,
Regards,
Howard


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Font Examples via a Macro

Adaptation of John Walkenbach's code;
http://j-walk.com/ss/excel/tips/tip79.htm

Sub ShowInstalledFonts()
Set FontList =
Application.CommandBars("Formatting").FindControl( Id:=1728)

' If Font control is missing, create a temp CommandBar
If FontList Is Nothing Then
Set TempBar = Application.CommandBars.Add
Set FontList = TempBar.Controls.Add(Id:=1728)
End If

' Put the fonts into column A
' Range("A:A").ClearContents
For i = 0 To FontList.ListCount - 1
Cells(i + 3, 1).Value = Range("A2").Value
Cells(i + 3, 1).Font.Name = FontList.List(i + 1)
Next i

' Delete temp CommandBar if it exists
On Error Resume Next
TempBar.Delete
End Sub

--
Regards,
Tom Ogilvy


"L. Howard Kittle" wrote in message
...
Hi Excel Experts and Users,

Excel 2002 SP3

Is there a way to type a string into a cell and run a macro that will
produce an example of the Excel fonts using the string text?

So, if I enter DESPERADO in A1, I get an example of all available fonts of
desperado in A2 through A??.

Thanks,
Regards,
Howard




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Font Examples via a Macro

Hi Tom,

I see my thanks did not get through.

So again...

Thank you!

Regards,
Howard

"L. Howard Kittle" wrote in message
...
Hi Excel Experts and Users,

Excel 2002 SP3

Is there a way to type a string into a cell and run a macro that will
produce an example of the Excel fonts using the string text?

So, if I enter DESPERADO in A1, I get an example of all available fonts of
desperado in A2 through A??.

Thanks,
Regards,
Howard



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
Solver examples moniong Excel Worksheet Functions 1 November 4th 08 09:51 PM
Need Better Examples for VLOOKUP and the like BigJDevine Excel Worksheet Functions 4 January 11th 08 07:10 AM
Excel VBA examples [email protected] Excel Discussion (Misc queries) 1 July 3rd 07 01:47 PM
about examples hassan barjini New Users to Excel 1 November 2nd 05 11:08 AM
Tutorials with examples Hervet Excel Programming 1 January 7th 05 06:29 PM


All times are GMT +1. The time now is 05:23 PM.

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"