Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run my code
I have three pieces of code. Depending on the value of a specific cell I want
one of these bits of code to run. The code doesnt assign a value to a cell but sets another cells validation list. How can I get this code to run automatically? If it was Access I would assign the code to the on change event of the field, but I dont know if this is possible in Excel€¦ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run my code
You would use a Worksheet_Change event macro. Within the macro, you would
write code to continue execution only when that specific cell's value changes. Subsequent code would do what you want for the specific value entered. Post back if you need further help with this. Include more detail about what you have and what you want to happen. HTH Otto "Keith" wrote in message ... I have three pieces of code. Depending on the value of a specific cell I want one of these bits of code to run. The code doesn't assign a value to a cell but sets another cells validation list. How can I get this code to run automatically? If it was Access I would assign the code to the on change event of the field, but I don't know if this is possible in Excel. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run my code
What I have is a sheet for users to fill in where they have been that week.
So each sheet will have 10 - 15 rows that will all require the same code to run, but of cource the cell that is being looked at and the cell that is being updated will be different. For example cell F5 has a validation list with three options. Acute, Primary and Other. Depending what option the user selects means the validation list for cell G5 will change. I have the three lists defind as named ranges on another sheet. So if F5 says Acute then the Acute list is shown for cell G5, and if cell F6 has Primary then cell G6 will have the Primary list to select from. I hope that makes sence. "Otto Moehrbach" wrote: You would use a Worksheet_Change event macro. Within the macro, you would write code to continue execution only when that specific cell's value changes. Subsequent code would do what you want for the specific value entered. Post back if you need further help with this. Include more detail about what you have and what you want to happen. HTH Otto "Keith" wrote in message ... I have three pieces of code. Depending on the value of a specific cell I want one of these bits of code to run. The code doesn't assign a value to a cell but sets another cells validation list. How can I get this code to run automatically? If it was Access I would assign the code to the on change event of the field, but I don't know if this is possible in Excel. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run my code
I have a sheet that logs what type of call a rep has made. The sheet can
have 10 €“ 15 entries on it. So whit will happen is: Cell F5 has a validation list assigned to it with three values. Acute, Primary and Other. Depending on which option is selected I want the cell G5 to have its validation list changed to represent the options for the value in F5. All the lists have been defined on another sheet as named ranges. As above this will be the same for the other rows. So the value set in F6 will effect the validation list for G6. I hope this makes sence. "Otto Moehrbach" wrote: You would use a Worksheet_Change event macro. Within the macro, you would write code to continue execution only when that specific cell's value changes. Subsequent code would do what you want for the specific value entered. Post back if you need further help with this. Include more detail about what you have and what you want to happen. HTH Otto "Keith" wrote in message ... I have three pieces of code. Depending on the value of a specific cell I want one of these bits of code to run. The code doesn't assign a value to a cell but sets another cells validation list. How can I get this code to run automatically? If it was Access I would assign the code to the on change event of the field, but I don't know if this is possible in Excel. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I run my code
Keith
From what you say, I don't think you need any code. What you say you want is one list dependent on the selection from another list. Look here for details about how to do that. HTH Otto http://www.contextures.on.ca/xlDataVal02.html "Keith" wrote in message ... I have a sheet that logs what type of call a rep has made. The sheet can have 10 - 15 entries on it. So whit will happen is: Cell F5 has a validation list assigned to it with three values. Acute, Primary and Other. Depending on which option is selected I want the cell G5 to have its validation list changed to represent the options for the value in F5. All the lists have been defined on another sheet as named ranges. As above this will be the same for the other rows. So the value set in F6 will effect the validation list for G6. I hope this makes sence. "Otto Moehrbach" wrote: You would use a Worksheet_Change event macro. Within the macro, you would write code to continue execution only when that specific cell's value changes. Subsequent code would do what you want for the specific value entered. Post back if you need further help with this. Include more detail about what you have and what you want to happen. HTH Otto "Keith" wrote in message ... I have three pieces of code. Depending on the value of a specific cell I want one of these bits of code to run. The code doesn't assign a value to a cell but sets another cells validation list. How can I get this code to run automatically? If it was Access I would assign the code to the on change event of the field, but I don't know if this is possible in Excel. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming |