ListBox Result to a Specific Cell Location

R

Randal W. Hozeski

I am putting the result of a ListBox into a Chart Title the formula that
in am pulling it from is:

="Daily Tracking Report as of "&TEXT(K1,"mm/dd/yy")&"For: "&J1

I need the result of ListBox1 on UserForm5 to display in cell J1 as
text.

I select from UserForm5.ListBox1 a name, and that name is used to then
AutoFilter a dataset by. I also need that selected name to populate
cell
J1 (before or after) the dataset is filtered. It appears that after the
filter
happens it loses what value was selected.

Any suggestion? -Randy-

My Code:

With Worksheets("DataPage")
.Activate
.Range("A1"). _
CurrentRegion.AutoFilter Field:=1, _
Criteria1:=UserForm5.ListBox1.Value
With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count, 3). _
SpecialCells(xlVisible).Select
End With
End With
 
T

Tom Ogilvy

With Worksheets("DataPage")
.Activate
.Range("J1").Value = Userform5.ListBox1.Value
.Range("A1"). _
CurrentRegion.AutoFilter Field:=1, _
Criteria1:=UserForm5.ListBox1.Value
With .AutoFilter.Range
.Offset(0, 1).Resize(.Rows.Count, 3). _
SpecialCells(xlVisible).Select
End With
End With
 

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