Helly everybody,

I will try to keep this as simple as possible.

 1. I have a **function** which looks like this:
Min[T_,E_, D_] := Module[ ..... List = {...} ];

In any case this Function gives me a list that looks like this {1,2,1,4,5,2,1} etc. (Actually D determines the number of entries in this list)

 2. I use **Listplot** to plot this list.

ListPlot[Min[T,E, D], PlotRange -> {Automatic, {0,  0.5}}]

 3. I use **Manipulate** to be able to manipulate any of these 3 Variables.

 ListPlot[Min[...], {T, 1, 20}, {D, 10, 20}, {E, 1, 20}]

Everything worked perfectly and dandy but I ran into one problem. **Variable E has a dynamic limit that changes when I change D or T and few other factors**

 4. So in order to be able to calc. the dynamic Limit of Variable E I had to write a **few new lines in the old Min[...]** Function.

So now it looks something like this:

Min[T_,E_, D_] := Module[ Emax = T+D+a; 
List = {...} ];   (a is a variable only used in that function)

Even though Emax is getting calc. correctly I just cannot use it outside of the function.

When I plug it into the Manipulate stuff like this:
 ListPlot[Min[...], {T, 1, 20}, {D, 10, 20}, {E, 1, **Emax**}] **the Programm does not know what Emax is.**

Any ideas what I can do? 

I need to use a Variable from inside a function as limit for a manipulate. 

Thanks in advance for any help (: