Take a look at the PopupWindow function. Be aware though that the AFL code won't stop while the window is displayed, so if you do an exploration over a few hundred stocks where every stock gives a popup window, you could end up with dozens of the windows showing at the same time.
GP --- In [email protected], "Ken Close" <[EMAIL PROTECTED]> wrote: > > I do not recall this being discussed (but of course I forget lots of past > messages). > > In making some code to be run in AA by an inexperienced AB user, I want to > error trap some situations that are likely to be encountered and then give a > message to the user instead of the program dropping into the Formula Editor > with a yellow line on the offending line. > > In general, is it possible? > > I realize the answer is to set up the program to avoid every situation where > the error might occur. > > In my case, I have a subscripted formula in a loop which will yield a > "subscript out of range" if the current symbol contains less days of data > than the Parameters are set for. > > I set a startdate, calculate a "FirstBar" for the range that is set, and > then use a "FirstBar - 1" subscript, which works fine if the calculated > FirstBar is always greater than the actual first bar. If the data does not > exist earlier than the date set for FirstBar, then the error pops up. > > Thus my question: is it possible to sense the error condition and display > an error message of the users choosing? > > The less elegant way is to instruct the user that if they see a yellow line > in the Formula Editor, to check that the FirstBar date is set at or after > the beginning of the shortest data symbol. > > Comments? > > Ken >
