VB6.Format("#0.###") sometimes works, sometimes not

C

C

Name VB6 is not declared, says one of the two programs. The other one
has been converted from *.vbp to VB Exp 2008. Is there something I
have to declare somewhere?

The automatically converted code contains also
Option Strict Off
Option Explicit On

Thanks.
 
A

Armin Zingler

Am 04.08.2010 15:49, schrieb C:
Name VB6 is not declared, says one of the two programs. The other one
has been converted from *.vbp to VB Exp 2008. Is there something I
have to declare somewhere?

The automatically converted code contains also
Option Strict Off
Option Explicit On

In a converted project, VB6.Format is inside a compatibility Dll. The Dll
is only there to support the upgrade process, but it's strongly recommended
not to use for new projects. Instead, use the ToString method:

dim d as double = 3.1415
dim s as string

s = d.ToString("0.00")
 
C

C

Am 04.08.2010 15:49, schrieb C:



In a converted project, VB6.Format is inside a compatibility Dll. The Dll
is only there to support the upgrade process, but it's strongly recommended
not to use for new projects. Instead, use the ToString method:

 dim d as double = 3.1415
 dim s as string

 s = d.ToString("0.00")

Thanks. This looks straightforward.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top