Microsoft KB Archive/260152

= PRB: Error &quot;Can't Compile Module&quot; in eMbedded Visual Basic Watch Window =

Article ID: 260152

Article Last Modified on 9/4/2002

-

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:





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



Steps to Reproduce Behavior
 Create a new Windows CE (HPC) project in Visual Basic. Form1 is created by default. On the Tools menu, click Options. On the Editor tab, make sure that the Auto Data Tips check box is selected.  Add the following code to the Form: Public Declare Sub Sleep Lib &quot;Coredll&quot; (ByVal dwMilliseconds As Long) Private Sub Form_Click Dim i as Integer i = 9      'Set breakpoint here. i = 8 End Sub

 Set a Breakpoint on the line &quot;i = 9&quot;. 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. Highlight the &quot;i&quot;. On the Debug menu, click Add Watch, and then click OK. The &quot;i&quot; should be evaluated in the Watches window, such as &quot;i = Empty&quot;.</li> Highlight the &quot;i&quot; again. Notice that the Auto Data tip does not display when you highlight the &quot;i&quot;; instead, it appears as though nothing has happened.</li> In the Watches windows, click the &quot;i&quot;. Notice that the value of the expression returns as &quot;i = [Can't compile module]&quot; instead of &quot;i = Empty&quot;.</li></ol>

<div class="references_section">