Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'To incrementally populate the cells to the right with the selections:
Private Sub Worksheet_Change(ByVal Target As Range) Dim c As Range Set c = ActiveCell If Not Target.Address = c.Address Then Exit Sub Application.EnableEvents = False Cells(c.Row, Columns.Count).End(xlToLeft)(1, 2) = c.Value Application.EnableEvents = True End Sub 'To change all cells to the right with the current selection: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range, c As Range Set c = ActiveCell If Not Target.Address = c.Address Then Exit Sub Application.EnableEvents = False Set rng = Range(c(1, 2), Cells(c.Row, Columns.Count)) rng.Value = c.Value Application.EnableEvents = True End Sub Regards, Greg "Man Utd" wrote: I figure out that I can use a formula in the other cells but I do need a macro as the user may accidentally delete the contents of these cells and the formula will also be deleted. So I need to capture this event handler and then call a function/procedure/macro to do a look up and fetch the values and fill in these other cells. "Man Utd" wrote in message ... I have made a dropdonwbox in a cell by defining a validation list to the cell. Is it possible to catch the event when the user select an item in the dropdownbox? I want to fill up other cells in the same row when it happens. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Master details in 2 dropdownbox | Excel Programming | |||
Dropdownbox | Excel Programming | |||
Dropdownbox | Excel Programming | |||
Dropdownbox | Excel Programming | |||
Dropdownbox | Excel Programming |