Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) Thulasiram[_2_] Excel Programming 4 September 26th 06 04:15 AM
Excel code convert to Access code - Concat & eliminate duplicates italia Excel Programming 1 September 12th 06 12:14 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM


All times are GMT +1. The time now is 12:04 AM.

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

About Us

"It's about Microsoft Excel"