Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default How to get a dump of Fill Color & Font VBA Constants?

2003

Would like to create a w/s that has a listing of Font constants like
-4105 and Fill like 8 that are applicable to my workbook as I thing
that the data follows th book?.

Once that I have that list I then will do a Vlookup to populate another
worksheet.

Thanks,

EagleOne

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default How to get a dump of Fill Color & Font VBA Constants?

See this: http://www.cpearson.com/excel/CFColors.htm

and this: http://www.cpearson.com/excel/colors.htm

"EagleOne" wrote:

2003

Would like to create a w/s that has a listing of Font constants like
-4105 and Fill like 8 that are applicable to my workbook as I thing
that the data follows th book?.

Once that I have that list I then will do a Vlookup to populate another
worksheet.

Thanks,

EagleOne


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default How to get a dump of Fill Color & Font VBA Constants?

First set a reference to the Typelib dll. You will need to browse for it, it
won't be automatically loaded, On my machine it is called TLBINF32.DLL.

Then run this code. It is set for Exzcel XP, you might need to check the OLB
file for your Excel.


VBA:

Public Sub GetWordConstants()
Dim oOLB As Object
Dim sText As String
Dim oOLBc, oOLBm
Dim j As Integer

On Error Resume Next

With Worksheets("Constants")
With .Range("A1")
.Offset(0, 1).Value = "Excel"
.Offset(1, 1).Value = "XL5EN32.OLB"
.Cells(3, 1).Resize(.CurrentRegion.Rows.Count, 2).ClearContents
Set oOLB = TypeLibInfoFromFile(Application.Path &
"\XL5EN32.OLB")
j = 2
For Each oOLBc In oOLB.Constants
For Each oOLBm In oOLBc.Members
.Offset(j, 0).Value = oOLBm.Name
.Offset(j, 1).Value = oOLBm.Value
j = j + 1
Next oOLBm
Next oOLBc
End With
.Visible = True
.Activate
.Range("A1").Select
End With

Set oOLB = Nothing

End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"EagleOne" wrote in message
ups.com...
2003

Would like to create a w/s that has a listing of Font constants like
-4105 and Fill like 8 that are applicable to my workbook as I thing
that the data follows th book?.

Once that I have that list I then will do a Vlookup to populate another
worksheet.

Thanks,

EagleOne



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default How to get a dump of Fill Color & Font VBA Constants?


Thanks Bob!


Bob Phillips wrote:
First set a reference to the Typelib dll. You will need to browse for it, it
won't be automatically loaded, On my machine it is called TLBINF32.DLL.

Then run this code. It is set for Exzcel XP, you might need to check the OLB
file for your Excel.


VBA:

Public Sub GetWordConstants()
Dim oOLB As Object
Dim sText As String
Dim oOLBc, oOLBm
Dim j As Integer

On Error Resume Next

With Worksheets("Constants")
With .Range("A1")
.Offset(0, 1).Value = "Excel"
.Offset(1, 1).Value = "XL5EN32.OLB"
.Cells(3, 1).Resize(.CurrentRegion.Rows.Count, 2).ClearContents
Set oOLB = TypeLibInfoFromFile(Application.Path &
"\XL5EN32.OLB")
j = 2
For Each oOLBc In oOLB.Constants
For Each oOLBm In oOLBc.Members
.Offset(j, 0).Value = oOLBm.Name
.Offset(j, 1).Value = oOLBm.Value
j = j + 1
Next oOLBm
Next oOLBc
End With
.Visible = True
.Activate
.Range("A1").Select
End With

Set oOLB = Nothing

End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"EagleOne" wrote in message
ups.com...
2003

Would like to create a w/s that has a listing of Font constants like
-4105 and Fill like 8 that are applicable to my workbook as I thing
that the data follows th book?.

Once that I have that list I then will do a Vlookup to populate another
worksheet.

Thanks,

EagleOne


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
Sort or sub-total by Fill color or font color Excel_seek_help Excel Discussion (Misc queries) 1 April 27th 06 09:01 PM
Criteria - Automatic Change Font or Fill Colour stevembe Excel Worksheet Functions 4 October 4th 05 04:43 AM
Default cell comment fill color and font size Shadowman13 Excel Discussion (Misc queries) 2 September 28th 05 08:16 PM
My fill color and font color do not work in Excel Std Edition 2003 chapstick Excel Discussion (Misc queries) 1 September 11th 05 08:48 PM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM


All times are GMT +1. The time now is 07:26 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"