Here is a block of code:

MsgBox "Focus is " & DotNETForm("Server Options DotNETForm").Focus
If Not (DotNETForm("Server Options DotNETForm").Focus) Then
DotNETForm("Server Options DotNETForm").SetFocus
End If
MsgBox "Focus is " & DotNETForm("Server Options DotNETForm").Focus
DotNETForm("Server Options DotNETForm").Attach
MsgBox "Focus is " & DotNETForm("Server Options DotNETForm").Focus
DotNETButton ("Name=cmdClose")

In this code block, I placed a few "MsgBox" statements to check if the DotNETForm has focus. All through the code, the Focus is False. The goal of this code is to automatically close the "Server Options DotNETForm", which it doesn't.

Can anyone please help me out with this code as this is part of a major automated script assignment I have? I really would appreciate your assistance. Thanks very much.