On 8/1/04 00:07, Andrew Keller wrote:
> This code is supposed to find the frontmost instance of a window called
> frmCopy, but I get a Type Mismatch Error on line 6.
>
>
> Dim w As frmCopy
> Dim i,j As Integer
> j=WindowCount-1
> For i=0 to j
> If Window(i) IsA frmCopy Then
> w=Window(i) // Type Mismatch Error, RB didn't highlight anything
> Exit
> End If
> Next
When RB is compiling, it sees Window(i) as just a generic window, so it
chokes. Try coercing it to a frmCopy:
w = frmCopy(Window(i))
George
--
George Clark - gaclark at sprynet dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|