PRB: Error "Can't Compile Module" in eMbedded Visual Basic Watch Window (260152)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q260152

SYMPTOMS

When your eMbedded Visual Basic (eVB) project contains a Declare statement in a form, if the Auto Data Tips check box is selected in the Options dialog box, the value of an expression in the Watch window may return as:
<Can't compile Module>

RESOLUTION

To resolve this problem, move the Declare statement to a module (.bas file).

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE (HPC) project in Visual Basic. Form1 is created by default.
  2. On the Tools menu, click Options. On the Editor tab, make sure that the Auto Data Tips check box is selected.
  3. Add the following code to the Form:
            Public Declare Sub Sleep Lib "Coredll" (ByVal dwMilliseconds As Long)
    	Private Sub Form_Click()
        		Dim i as Integer
        		i = 9		'Set breakpoint here.
        		i = 8
    	End Sub
    
    					
  4. Set a Breakpoint on the line "i = 9".
  5. Press the F5 key to run the project, and then click on the form. You should be in Debug Break mode on the breakpoint now.
  6. Highlight the "i". On the Debug menu, click Add Watch, and then click OK. The "i" should be evaluated in the Watches window, such as "i = Empty".
  7. Highlight the "i" again. Notice that the Auto Data tip does not display when you highlight the "i"; instead, it appears as though nothing has happened.
  8. In the Watches windows, click the "i". Notice that the value of the expression returns as "i = [Can't compile module]" instead of "i = Empty".

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

260080 INFO: eMbedded Visual Basic 3.0 Release Notes


Modification Type:MajorLast Reviewed:9/4/2002
Keywords:kbDSupport kbprb KB260152