Microsoft KB Archive/101580

= PRB: File Not Found Error When Running .EXE on Other Computer =

Article ID: 101580

Article Last Modified on 10/28/2003

-

APPLIES TO


 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q101580



SYMPTOMS
When you try to use the IIf function in Visual Basic version 3.0 for Windows, you receive a "File Not Found" error when you try to run your executable program on a separate computer that does not contain the file MSAFINX.DLL.



CAUSE
The "File Not Found" error occurs because the IIf function is not included in VBRUN300.DLL file but is located in the MSAFINX.DLL file.



RESOLUTION
To prevent the error, install the MSAFINX.DLL file on the customer's computer in the \WINDOWS\SYSTEM subdirectory.



MORE INFORMATION
Below is a list of all the financial functions in the MSAFINX.DLL file: DDB         FV           IPMT         IRR          MIRR NPER        NPV          PMT          PPMT         PV RATE         SLN          SYD Below is a list of all the date functions in the MSAFINX.DLL file: DATE        DATE$        DATEADD      DATECREATED  DATEDIFF DATEPART    DATESERIAL   DATEVALUE    DAVG         DAY Below is a list of the other functions in the MSAFINX.DLL: IIF         PARTITION A "File Not Found" error occurs if you use any of the these functions in your program and then use the program on a computer that does not contain the MSAFINX.DLL file.

Steps to Reproduce Behavior
The following steps cause the "File Not Found" error in Visual Basic version 3.00 for Windows.

 Start Visual Basic (VB.EXE). Add a text box (Text1) and a label (Label1) to Form1.  Enter the line of code on page 274 in the Language Reference manual: Sub Label1_Click Label1.Caption = IIf(Val(text1.text) > 1000, "Large", "Small") '*** note you may want to add the Val statement for numbers End Sub  Run the example and enter a number in the Text1 text box. Then click Label1 to see if the example works in the environment.</li> From the File menu, choose Make Exe File... Name the executable IIFTEST.EXE. Save the project as IIFTEST.MAK, and save the form as IIFTEST.FRM.</li> Copy the IIFTEST.EXE and VBRUN300.DLL files to a floppy disk.</li> Take the floppy disk to a computer that does not have Visual Basic version 3.0 installed. Try and run the IIFTEST.EXE file from File Manager on that computer. You should get the "File Not Found" error.</li> If you add the file MSAFINX.DLL to the floppy disk, and then run the IIFTEST.EXE file, no error will occur.</li></ol>

Additional query words: 3.00

Keywords: kbprb KB101580

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.