+ Reply to Thread
Results 1 to 5 of 5

combobox and workbook_change event

  1. #1
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    combobox and worksheet_change event

    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!

    Please Login or Register  to view this content.
    Last edited by leonidas; 07-13-2006 at 10:31 AM.

  2. #2
    Tom Ogilvy
    Guest

    RE: combobox and workbook_change event

    Why not use the click event of the combobox.

    --
    Regards,
    Tom Ogilvy


    "leonidas" wrote:

    >
    > 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
    > --------------------
    >
    >
    > --
    > leonidas
    > ------------------------------------------------------------------------
    > leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
    > View this thread: http://www.excelforum.com/showthread...hreadid=561090
    >
    >


  3. #3
    witek
    Guest

    Re: combobox and workbook_change event

    leonidas wrote:
    > 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

  4. #4
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    combobox and worksheet_change event

    Hi,

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

  5. #5
    Registered User
    Join Date
    06-13-2006
    Posts
    76

    Problem solved!

    Hi,

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1