![]() |
ListBox Result to a Specific Cell Location
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 |
ListBox Result to a Specific Cell Location
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 -- Regards, Tom Ogilvy Randal W. Hozeski wrote in message news:Ee5Ib.232403$_M.1023113@attbi_s54... 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 |
All times are GMT +1. The time now is 10:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com