Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi is there a way to print something in a list box based on ht
formatting of data in a column? I want Excel to search through a column and if text in a cell is bol then to print that text in a list box. Any ideas? Thanks so much -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sheeny,
This is for a userform it works here. Private Sub CommandButton1_Click() Application.ScreenUpdating = False Dim i As Long Dim myrng As Range Worksheets("Sheet1").Activate Set myrng = Worksheets("sheet1").Cells(1, 1).CurrentRegion For i = 1 To myrng.Rows.Count With UserForm1 If myrng(i, 1).Font.Bold = True Then .ListBox1.AddItem myrng(i, 1).Value End If End With Next i End Sub HTH Charle -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I have right now...any ideas as to what i need to do t
make it work?? Private Sub CmdRec_Click() Application.ScreenUpdating = False Dim i As Long Sheet3.Activate With Sheet3 For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row If .Cells(i, "A").Font.Bold = True Then ListOld.AddItem .Cells(i, "A").Value End If Next i End With End Su -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your code works here if the cell's font is really bold.
It doesn't work if the bold is caused by conditional formatting. Is that what you're looking for by any chance? Sheeny < wrote: This is what I have right now...any ideas as to what i need to do to make it work?? Private Sub CmdRec_Click() Application.ScreenUpdating = False Dim i As Long Sheet3.Activate With Sheet3 For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row If .Cells(i, "A").Font.Bold = True Then ListOld.AddItem .Cells(i, "A").Value End If Next i End With End Sub --- Message posted from http://www.ExcelForum.com/ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Yes I was just playing around and realized thats my problem. Is there a way to read conditional formatting? Thanks -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing worksheets from a list | Excel Discussion (Misc queries) | |||
Printing from a list | Excel Discussion (Misc queries) | |||
Printing a list | Excel Discussion (Misc queries) | |||
Printing a list onto an envelope | Excel Discussion (Misc queries) | |||
Printing a list of tabs off | Excel Discussion (Misc queries) |