THanks, Aaron. Works in 90 percent of the cases. But still, every now and then, focus goes to the Close-button. Not sure why.
Any further idea? David On 9/30/2016 6:08 PM, Aaron Smith wrote: > I imagine the focus to your edit box is happening prior to the default focus > to the close button. Try queuing your control manipulation by doing something > like: > > If DEvent = DialogCreated Then > Queue "DialogInit", dObj > > . . . > > Sub DialogInit(dObj) > dObj.Control( "Box1" ).Text = FormatNumber( "2764.2345") > dObj.Control( "Box2" ).Focus() > End Sub > > Aaron > _______________________________________________ Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ai Squared. For membership options, visit http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com. For subscription options, visit http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com List archives can be found at http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com