Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually Tom, I havent figured this out yet.
"Tom Ogilvy" wrote: Guess you already have your answer. -- Regards, Tom Ogilvy "Piwo" wrote in message ... Tom, the cell value is based on a selection from a drop down list. Thanks "Tom Ogilvy" wrote: How does the value in K34 change? Is the cell manually edited, is it updated by a dde link, is it filled with a formula and thus calculated? -- Regards, Tom Ogilvy "Piwo" wrote in message ... Bob, Thanks for your help. I changed the code and it seems to run ok when I chose to run the macro with a specific command. however, I want it to run automatically when the value in k34 changes. Can you help with this? Thanks "Bob Phillips" wrote: Static prevValue Dim model As String Range("k34").Select model = ActiveCell.Value If model < prevValue Then Select Case model Case "" Exit Sub Case "60/40" Sheets("Model Allocation Inputs").Select Range("D25:D37").Copy Sheets("60-40 Charts").Select Range("F39").Select ActiveSheet.Paste Link:=True Case "80/20" Sheets("Model Allocation Inputs").Select Range("e25:e37").Copy Sheets("60-40 Charts").Select Range("F39").Select ActiveSheet.Paste Link:=True End Select Else prevValue = model End If -- HTH RP (remove nothere from the email address if mailing direct) "Piwo" wrote in message ... I have a cell that contains a drop down list. I want the macro to run if the list selection changes. For example: I currently selected 60/40 from the list. If I select 60/40 again, there is obviously no need to re run the macro. however, if I change the selection to 80/20 I would want to macro to run. Clear? Thanks Dim model As String Range("k34").Select model = ActiveCell.Value Select Case model Case "" Exit Sub Case "60/40" Sheets("Model Allocation Inputs").Select Range("D25:D37").Select Selection.Copy Sheets("60-40 Charts").Select Range("F39").Select ActiveSheet.Paste Link:=True Case "80/20" Sheets("Model Allocation Inputs").Select Range("e25:e37").Select Selection.Copy Sheets("60-40 Charts").Select Range("F39").Select ActiveSheet.Paste Link:=True End Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Average With < Continued | Excel Worksheet Functions | |||
If then statement continued! | Excel Discussion (Misc queries) | |||
continued help needed | Excel Programming | |||
Macros not appearing in the Tools Macro Macros list | Excel Programming | |||
List the Macros that can be executed from Tools-Macros | Excel Programming |