converting code from VB 3.0 to VB 5.0 
Author Message
 converting code from VB 3.0 to VB 5.0

Hi VB-fans

In a book I came across this code
PrInc= Val(InPrinc.txt)
Rate=Val(InRate.txt)
Term=Val(InTerm.Txt)

TempPmt=Payment (Princ, Rate/12, Term*12)

frmLoanTbl.Show
frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000"

The last command  result in a error-message in VB 5.0
What is the proper code to print a output on another form?

Thanks in advance
Harrie



Wed, 16 May 2001 03:00:00 GMT  
 converting code from VB 3.0 to VB 5.0
Before:
frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000"
After:
frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000")
Methinks that ye forgoteth a parenthesis ")" there  >^ on doth end of
thee line.
Quote:

>Hi VB-fans

>In a book I came across this code
>PrInc= Val(InPrinc.txt)
>Rate=Val(InRate.txt)
>Term=Val(InTerm.Txt)

>TempPmt=Payment (Princ, Rate/12, Term*12)

>frmLoanTbl.Show
>frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000"

>The last command  result in a error-message in VB 5.0
>What is the proper code to print a output on another form?

>Thanks in advance
>Harrie




Wed, 16 May 2001 03:00:00 GMT  
 converting code from VB 3.0 to VB 5.0


Quote:
>Hi VB-fans

>In a book I came across this code
>PrInc= Val(InPrinc.txt)
>Rate=Val(InRate.txt)
>Term=Val(InTerm.Txt)

>TempPmt=Payment (Princ, Rate/12, Term*12)

>frmLoanTbl.Show
>frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000"

>The last command  result in a error-message in VB 5.0
>What is the proper code to print a output on another form?

>Thanks in advance
>Harrie


I just copied and pasted the last line into a project. There's a couple of
problems with it:

1) Fomat$ is misspelled.  Should be Format$.

2)The closing parenthesis is missing.

Hope this helps,

Maria Turpin



Wed, 16 May 2001 03:00:00 GMT  
 converting code from VB 3.0 to VB 5.0
Hi there,

frmLoanTbl.Print Fomat$(TempPmt, "$#.#####.000")

Sorry but is'nt Format$ spelt with the r  :)



Thu, 17 May 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Converting from VB 3.0 -> VB 5.0

2. Help : Converting VB 3.0 Program to VB 5.0

3. Floating Point Speed - Comparison of VB 5.0, Delphi 3.0, and VC 5.0

4. Moving from VB 3.0 to VB 5.0

5. Testing performance of VB 5.0 FlexGrid, Grid32 and VB 3.0 Grid

6. Upgraded from VB 3.0 to VB 5.0 - have questions

7. VB 3.0 to VB 5.0

8. VB 5.0 vs VB 3.0 Form Editor

9. VB 3.0 to VB 5.0 program

10. Conversion from VB 3.0 to VB 5.0

11. VB 3.0 in VB 5.0

12. conversion from vb 3.0 to vb 5.0

 

 
Powered by phpBB® Forum Software