2 combobox change vlue

G

Guest

Hi
Have this
Private Sub UserForm_Initialize()
Dim myrange As Range

Set myrange = Sheets("desti").Range("desti")

For Each c In myrange
ComboBox1.AddItem c.Value
Next

Dim murange2 As Range

Set myrange2 = Sheets("beregn").Range("fly")

For Each a In myrange2
ComboBox2.AddItem a.Value
Next
End Sub

But i have some problems with the combobox2 there get data from
Sheets("beregn").Range("fly")
The data change after what there are coosen in combox1, its working on the
sheet
but how do i get the combox2 to select the new data from the sheet

hope somone understand me and can help.

Alvin
 
G

Guest

Forget the first

I have
this in a sheet
=INDIRECT.EXT("'H:\city breaks\priser\europa\["& priskalk!$L$4 &"
prisliste.xls]prisliste'!$B$1")

I want to change & priskalk!$L$4 & To the value off my combobox in the
userform
My combo look like this
Private Sub UserForm_Initialize()
Dim myrange As Range

Set myrange = Sheets("desti").Range("desti")

For Each c In myrange
ComboBox1.AddItem c.Value
Next
How do i get det value there are chosen in the combobox to the line with my
indirect.

Alvin


"Alvin Hansen" skrev:
 
T

Tom Ogilvy

Private Sub Combobox1_click()
Range("priskalk!$L$4").Value = Combobox1.Value
End Sub

--
Regards,
Tom Ogilvy

Alvin Hansen said:
Forget the first

I have
this in a sheet
=INDIRECT.EXT("'H:\city breaks\priser\europa\["& priskalk!$L$4 &"
prisliste.xls]prisliste'!$B$1")

I want to change & priskalk!$L$4 & To the value off my combobox in the
userform
My combo look like this
Private Sub UserForm_Initialize()
Dim myrange As Range

Set myrange = Sheets("desti").Range("desti")

For Each c In myrange
ComboBox1.AddItem c.Value
Next
How do i get det value there are chosen in the combobox to the line with my
indirect.

Alvin


"Alvin Hansen" skrev:
Hi
Have this
Private Sub UserForm_Initialize()
Dim myrange As Range

Set myrange = Sheets("desti").Range("desti")

For Each c In myrange
ComboBox1.AddItem c.Value
Next

Dim murange2 As Range

Set myrange2 = Sheets("beregn").Range("fly")

For Each a In myrange2
ComboBox2.AddItem a.Value
Next
End Sub

But i have some problems with the combobox2 there get data from
Sheets("beregn").Range("fly")
The data change after what there are coosen in combox1, its working on the
sheet
but how do i get the combox2 to select the new data from the sheet

hope somone understand me and can help.

Alvin
 

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