ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combo box value (https://www.excelbanter.com/excel-programming/406216-combo-box-value.html)

tpeter

combo box value
 
This is a simple question but it is the first time I have used a combo box.

I am creating a form to filter the data of a spreadsheet which will make the
charts seem dianamic.

I have set up the spreadsheet and am using the advanced filter but the form
is what will drop the data into the criteria cell. My problem is I don't know
how to take the value in the combo box and have it put into the criterial
cell. The combo box has the correct information in it. Any help would be
great. Here is the code for the combo box right now, the information needs go
on sheet 1.

Option Explicit
Public strType As String
Public strSeries As String




Private Sub ComboBox1_Change()

End Sub

Private Sub UserForm_Activate()
With ComboBox1 (needs to drop into cell "N3" renamed cell "Type")
.AddItem "AC250"
.AddItem "al425"
End With
With ComboBox2 (needs to drop into cell "O3" renamed cell "Series")
.AddItem "Regular"
.AddItem "TC"
End With
End Sub

Thank you for your help in advance.

FSt1

combo box value
 
hi
in the combobox change event put this....
Range("E1").Value = ComboBox1.Value
change the cell reference to reflect your sheet.

Regards
FSt1

"tpeter" wrote:

This is a simple question but it is the first time I have used a combo box.

I am creating a form to filter the data of a spreadsheet which will make the
charts seem dianamic.

I have set up the spreadsheet and am using the advanced filter but the form
is what will drop the data into the criteria cell. My problem is I don't know
how to take the value in the combo box and have it put into the criterial
cell. The combo box has the correct information in it. Any help would be
great. Here is the code for the combo box right now, the information needs go
on sheet 1.

Option Explicit
Public strType As String
Public strSeries As String




Private Sub ComboBox1_Change()

End Sub

Private Sub UserForm_Activate()
With ComboBox1 (needs to drop into cell "N3" renamed cell "Type")
.AddItem "AC250"
.AddItem "al425"
End With
With ComboBox2 (needs to drop into cell "O3" renamed cell "Series")
.AddItem "Regular"
.AddItem "TC"
End With
End Sub

Thank you for your help in advance.



All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com