The exact code depends on which version of Crystal and how you are executing the report within VB.

I use this code with the Crystal Reports Engine 8 Object Library (CRPEAuto), to set parameters.

VB Code:
  1. 'objReport  is declared as a CRPEAuto.Report
  2. With objReport
  3.     .ParameterPromptingEnabled = False
  4.            
  5.     .ParameterFields(1).SetCurrentValue Trim$(objWard.Ward)
  6.     .ParameterFields(2).SetCurrentValue dteFrom
  7.     .ParameterFields(3).SetCurrentValue dteTo
  8. End With

and this code is used with the Crystal Reports Designer 8.5 ActiveX Runtime Library (CRAXDRT)
VB Code:
  1. 'objReport is declare as CRAXDRT.Report
  2. With objReport
  3.     .EnableParameterPrompting = False
  4.  
  5.     .ParameterFields(2).AddCurrentValue Trim$(objWard.Ward)
  6.     .ParameterFields(2).AddCurrentValue dteFrom
  7.     .ParameterFields(3).AddCurrentValue dteTo
  8. End With

Note that if a parameter value has not been set Crystal will still display its dialog box, even if the ParameterPrompting property is False.