Re: one or more parameter values are not valid

From: Jim Vierra (jvierra_at_msn.com)
Date: 01/27/05


Date: Thu, 27 Jan 2005 17:22:23 -0500

Gordon - Your getting some clues. Where did you put the debug statement? In an On Error trap?

Is it possible that you have some bad code in the form?
Is it a custom or modified form?
Can yuo get a similar trap on a user error?

I would bet that some piece of code is misbehaving and that this is a side effect of that. Just wwhat could cause this behavior I can't say but I think you are beginning to sneek up on the source. It would be good if you could find some sequence of things that would nearly always cause the problem.

Another thing I thought of. Can you be in more than one inspector at the same time? Are you classing and activating new instances separately or does one code module handle all inspector activate events? I don't think it is a good idea to enter the ame event code while it is being used. I am not sure about this but it's worth looking into.

-- 
Jim Vierra 661815
  "Gordon Prince, MCP" <gordeaux@tekhelps.com> wrote in message news:e5oWRlLBFHA.3840@tk2msftngp13.phx.gbl...
  Here's the result of the Debug.Print statement:
    TypeName(myInsp.CurrentItem) = NoteItem, myInsp.Caption = InstantFile_MatNo_18148 - Note  
  This item is something I am working with recently, but wasn't actually triggering when the error occured. 
  Any suggestions on what else would be a useful trace statement, etc.?
    "Gordon Prince, MCP" <gordeaux@tekhelps.com> wrote in message news:e$X5kILBFHA.4028@TK2MSFTNGP15.phx.gbl...
    The error occurs on my development system, when I'm the only user on that system. I know I haven't sent myself a message, so a message being received isn't what's causing it (at least not all the time).
    Where would I put a trace statement in the code, since it fails on the call of the function, which appears to be on the firing of the event. Is there a way to see anything about what triggered the event? Something like this?
      Private Sub myInsp_Activate()
      Debug.Print "TypeName(myInsp.CurrentItem) = " & TypeName(myInsp.CurrentItem) & _
                          ", myInsp.Caption = " & myInsp.Caption
    The error can occur when Outlook is the only application open and I'm the only user.
    "Jim Vierra" <jvierra@msn.com> wrote in message news:uUXP1$IBFHA.3524@TK2MSFTNGP15.phx.gbl...
      You got the call stack.  It shows the event code was called from an event and not from elsewhere in the code.
      Is a message being received when the error occurs?
      Sometimes Virus Checker.Spam tools can interfere.
      I would put trace statements into the code and try and correlate other events with the problem.
      Something appears to be trying to create a new inspector but hasn't set the system up properly for the inspector to be created.
      Virus?
      -- 
      Jim Vierra 661815
        "Gordon Prince, MCP" <gordeaux@tekhelps.com> wrote in message news:u4PTxkIBFHA.2676@TK2MSFTNGP12.phx.gbl...
        I'm not sure what you mean "dump the call stack". What I posted is what I get when I Ctrl+Break, Debug, at the error message. How would I get the information you're suggesting?
        All the users have the same Outlook 2003 with the same patches. Half are running Windows 2000, half Windows XP. Some in each group are getting the error, some in each group aren't.
        I've been days without seeing the error on my machine, then sometimes I get it several times in 30 minutes.
        The only thing that seems to be consistent about it is that Outlook doesn't have the focus when the error happens.
          "Jim Vierra" <jvierra@msn.com> wrote in message news:eJcgdMIBFHA.3908@TK2MSFTNGP12.phx.gbl...
          Good - but having the call stack on an error is what we need.  If youcan catch teh error ?? then dumpt the call stack.  I suspect it's a fall-through or that some other pice of code is calling Activate with a null object or the wrong type of object.  That would be the easiest cause to remedy.  SInce it's intermittent we may want to look at which clients have this problem and analyze there installed system.  Are they all running the same version and patch level and on the same OS?
          Somewhere in this investigation something will probably stand out.
          Some other good question to ask yourself. .
          1.  How long from does it take from startup for this to happen?
          2.  Is it consistent anywhere? (any pC or user)
          3.  Have you run a "Detect & Repair" on the users in question?
          Finally try sprinkling some well placed trace statements in the code and log the result to a network file.  Some order of events might provide a clue.  Use Debug Assert on any objects you feel might be at question at times.
          Following these steps usually leads to some piece of information that gives us a clue as to how the code is getting entered illegally.
          Oh - of course, post to any related newsgroups in case someone else has seen this behavior and has more info to share.
          This is what "real" programming is like.  Who said VBA was for amateurs?
          -- 
          Jim Vierra 661815
            "Gordon Prince, MCP" <gordeaux@tekhelps.com> wrote in message news:etGwH7GBFHA.1084@tk2msftngp13.phx.gbl...
            I've attached a screenshot of the call stack.
            It's only one procedure deep -- Project1.ThisOutlookSession.myInsp_Activate.
              "Jim Vierra" <jvierra@msn.com> wrote in message news:OrckSGCBFHA.2540@TK2MSFTNGP09.phx.gbl...
              Can you pull and post the call stack?
              -- 
              Jim Vierra 661815
                "Gordon Prince, MCP" <gordeaux@tekhelps.com> wrote in message news:u5yAww%23AFHA.208@TK2MSFTNGP12.phx.gbl...
                My Outlook 2003 VBA code has been generating the following error message for at least several of the 25 users running it for the past couple of months. I'm stumped on how to clear up the problem. 
                Outlook1.gif is a screen shot of the error message.
                "Could not complete the operation. One or more parameter values are not valid."
                If I debug the error, I always am placed on this code on the top line (Private Sub myInsp_Activate())
                 (screen shot attached as Outlook2.gif).
                Private Sub myInsp_Activate()
                On Error GoTo Activate_Error
                  Dim myNoteItem As Outlook.NoteItem
                    If TypeName(myInsp.CurrentItem) = "NoteItem" Then
                        Set myNoteItem = myInsp.CurrentItem
                        If Left(myNoteItem.Subject, 18) = strIFmatNo Or Left(myNoteItem.Subject, 18) = strIFdocNo Then
                            Set myNoteItem = Nothing
                            myInsp.Close olDiscard
                        End If
                    End If
                On Error GoTo 0
                    Exit Sub
                    
                Activate_Error:
                    If Ok2Debug Then
                        Stop
                        Resume
                    End If
                End Sub
                I'm stumped about how to fix the problem. I don't have a way to cause the problem, but it does it to me occasionally, usually when Outlook doesn't appear to be doing anything. It happens when I'm connected to the production server and also when I'm connected to the development server. I'm the only user on the development server, so that's really got me puzzled. 
                The code does what it's supposed to do and I've never caught the error when the NoteItem is opened by the user double-clicking on it.
                Any ideas what's causing the errors?


Relevant Pages

  • Re: one or more parameter values are not valid
    ... I'm not sure what you mean "dump the call stack". ... What I posted is what I get when I Ctrl+Break, Debug, at the error message. ... The only thing that seems to be consistent about it is that Outlook doesn't have the focus when the error happens. ... Following these steps usually leads to some piece of information that gives us a clue as to how the code is getting entered illegally. ...
    (microsoft.public.office.developer.outlook.vba)
  • Windows Explorer Application Error
    ... Click on CANCEL to debug the program ... If I click on OK, the error message goes away, I'm back to my desktop, all ... I still cannot use any USB ports or optical drives. ... Windows Memory Diagnostic. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Error while trying to debug
    ... When I was trying to open one of my ASP projects somewhere else, I got the following error message: ... Check to see that the project has a valid Web.config file, that the Web.config file sets "debug" to true, and that the debug verb is associated with .aspx. ... An error occurred during the processing of a configuration file required to service this request. ... Source Error: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • file streams (ofstream, ifstream, fstream): access violation reading location 0x00000000
    ... When I debug my console application with Visual Studio (2003 in release ... build and 2005 in both debug and release), I get this error message in the ... Runtime libraries are Multi-threaded Debug and Multi-threaded for debug and ...
    (microsoft.public.vc.language)
  • Re: VS crash after debug
    ... Exception Information ... I think this error message is much more helpful. ... further check and did find some "Visual Basic internal compiler error" ... The problem is only after a debug session. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast