"Invalid Procedure Call" 
Author Message
 "Invalid Procedure Call"

The following code gets executed as a result of a call to
tabSysOpts_Click (SSTab control).  I'm not actually clicking; I assume
it's because of the way VB initiates events even when you least expect
them.  In any event, I'm getting an "Invalid Procedure Call" on the
indicated line below.  Any ideas as to why?

' Set the focus to the first control on each tab
    Select Case tabSysOpts.Tab
        Case 0
            txtUID.SetFocus
        Case 1
            CmbComPort.SetFocus
        Case 2
            ModemBrandList.SetFocus  <=== Invalid Procedure Call
    End Select



Sun, 11 Jul 1999 03:00:00 GMT  
 "Invalid Procedure Call"

Is it visible? Invisible controls cannot receive the focus.
--
Chris Behrens
Site Builder Network Level 2
http://www.deltav.net


"Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read."



Quote:
> The following code gets executed as a result of a call to
> tabSysOpts_Click (SSTab control).  I'm not actually clicking; I assume
> it's because of the way VB initiates events even when you least expect
> them.  In any event, I'm getting an "Invalid Procedure Call" on the
> indicated line below.  Any ideas as to why?

> ' Set the focus to the first control on each tab
>     Select Case tabSysOpts.Tab
>         Case 0
>             txtUID.SetFocus
>         Case 1
>             CmbComPort.SetFocus
>         Case 2
>             ModemBrandList.SetFocus  <=== Invalid Procedure Call
>     End Select



Sun, 11 Jul 1999 03:00:00 GMT  
 "Invalid Procedure Call"

The control has to be visible and enabled.
Also make sure that this code does not execute in the form's load or in the
form's activate events because none of the controls are yet visible then.



Quote:
> The following code gets executed as a result of a call to
> tabSysOpts_Click (SSTab control).  I'm not actually clicking; I assume
> it's because of the way VB initiates events even when you least expect
> them.  In any event, I'm getting an "Invalid Procedure Call" on the
> indicated line below.  Any ideas as to why?

> ' Set the focus to the first control on each tab
>     Select Case tabSysOpts.Tab
>         Case 0
>             txtUID.SetFocus
>         Case 1
>             CmbComPort.SetFocus
>         Case 2
>             ModemBrandList.SetFocus  <=== Invalid Procedure Call
>     End Select



Mon, 12 Jul 1999 03:00:00 GMT  
 "Invalid Procedure Call"

Quote:

> The control has to be visible and enabled.
> Also make sure that this code does not execute in the form's load or in the
> form's activate events because none of the controls are yet visible then.



> > The following code gets executed as a result of a call to
> > tabSysOpts_Click (SSTab control).  I'm not actually clicking; I assume
> > it's because of the way VB initiates events even when you least expect
> > them.  In any event, I'm getting an "Invalid Procedure Call" on the
> > indicated line below.  Any ideas as to why?

> > ' Set the focus to the first control on each tab
> >     Select Case tabSysOpts.Tab
> >         Case 0
> >             txtUID.SetFocus
> >         Case 1
> >             CmbComPort.SetFocus
> >         Case 2
> >             ModemBrandList.SetFocus  <=== Invalid Procedure Call
> >     End Select

It turned out to be exactly that; namely, the code was getting executed
(unexpectedly) during the program's initial loading.  I already had a
flag indicating the initial startup sequence, so was able to easily
bypass running the code until the app (and form) was visible.

Thanks!!

Bob



Tue, 13 Jul 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. "Invalid procedure call..." on "txtDim(0).SetFocus"

2. Run-time error "5": Invalid procedure call

3. Anyone know a fix for "Invalid procedure call..." crashes program when MsgBox displayed?

4. compile error "invalid procedure call or argument

5. compile error "invalid procedure call or argument

6. Call procedure on "On Click" event

7. Passing "State" Into Called Procedures

8. "INVALID DATA FORMAT"

9. Need help with "Invalid Argument"

10. "Invalid use of null" error

11. "Operation invalid without current index"

12. "Invalid Argument" Error Message

 

 
Powered by phpBB® Forum Software