combobox and workbook_change event

  • Thread starter Thread starter leonidas
  • Start date Start date
L

leonidas

Hi,

I have a macro (see the code below) which changes the values of cell
W14 to W24 when cell W13 (range("KolomWFunderingWon")) is changed. Whe
I insert anything at all in cell W13 the cells W14 to W24 are changed
but when I use a combobox and the linkedcell of that combobox is W1
and I choose something in the combobox so the value of cell W13 i
changed, nothing happens!
Is it possible to change cells W14 to W24 by using a combobox? Thank
in advance for helping me!


Code
-------------------
Private Sub Worksheet_Change(ByVal Target As Range)

If Range("KolomWFunderingWon").Value <> "" Then
Range("W14:W24").Value = Range("KolomWFunderingWon").Value
End If

End Su
 
leonidas said:
Hi,

I have a macro (see the code below) which changes the values of cells
W14 to W24 when cell W13 (range("KolomWFunderingWon")) is changed. When
I insert anything at all in cell W13 the cells W14 to W24 are changed,
but when I use a combobox and the linkedcell of that combobox is W13
and I choose something in the combobox so the value of cell W13 is
changed, nothing happens!
Is it possible to change cells W14 to W24 by using a combobox? Thanks
in advance for helping me!


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)

If Range("KolomWFunderingWon").Value <> "" Then
Range("W14:W24").Value = Range("KolomWFunderingWon").Value
End If

End Sub
use combobox_change event instead of worksheet_change event
 
Hi,

I cannot use the combobox_change or combobox_click event, because whe
I insert a row above this combobox in my worksheet I also have a macr
that inserts a new combobox in this inserted row and the comboboxe
below are rename like "combobox i = combobox i+1". So when I insert
row, the wrong combobox should be changed to do the trick. That's wh
I'd like to change cells W14 to W24 by a worksheet_change event. Do yo
have any solutions?
Thanks in advance
 
Hi,

I have solved the problem by using a worksheet_calculate event instead
of the worksheet_change event.
 

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

Back
Top