LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Event of the dropdownbox in a cell

'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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master details in 2 dropdownbox Man Utd Excel Programming 1 June 15th 05 05:40 AM
Dropdownbox Debra Dalgleish Excel Programming 1 August 6th 04 09:13 AM
Dropdownbox Alvin Hansen[_2_] Excel Programming 0 August 5th 04 07:55 AM
Dropdownbox Frank Kabel Excel Programming 1 August 5th 04 07:27 AM
Dropdownbox libby Excel Programming 0 August 4th 04 10:11 PM


All times are GMT +1. The time now is 11:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"