The CheckActiveWin command verifies that the same window that was open and active when you began recording a macro is the same window that is open and active when the macro is played. If a different window is open and active when the macro is played, a message will be displayed indicating the macro didn't start on the correct window.
CheckActiveWin dictionary dictionary_name form form_name window window_name
• dictionary_name - The name of the dictionary. The 'default' parameter can also be used, indicating the current main application dictionary will be used.
• form_name - The name of the form containing the window that must be open and active when the macro begins running.
• window_name - The name of the window that must be open and active when the macro begins running.
When you begin recording a macro, this command is placed at the beginning of the macro file only if a window is open and active. (This doesn't include tool bar windows, which can be open, but aren't active unless you're working with fields in them.)