View Full Version : Problem formatting telephonenumber


basura
07-28-2008, 01:17 AM
Grumble..... :mad:

I have a multiple select list in which I select a line that includes a telephonenumber. This telephone number is displayed okay here, like 06######## (# is a digit)

Dim As String = telephoneNumber
telephoneNumber = Me.List0.Column(1, varItm)

later on I write this to a temporary table:
tmpTable("telephoneNr").Value = telephoneNumber
tmpTable.Update

From this tmpTable I make an export to xls. But in my xls my telephone is displayes as

6########

without the preceding zero :(

I tried

Dim As String = telephoneNumber
telephoneNumber = "0" + Me.List0.Column(1, varItm)

But this gives a debug error

I looked at the Format() function but it didn't brought me anywhere....

Anyone willing to help me pleaz ? :o

CyberLynx
07-28-2008, 01:33 AM
I would think Format should work:

Format(telephoneNumber, "0000000000")

.

basura
07-28-2008, 02:18 AM
Thanks CyberLynx, but I just found out this isn't the problem: I put a MsgBox to view the string and it seems okay just before I export it to Excel so I presume I have to format it perhaps in another way but I don't now how

basura
07-28-2008, 03:38 AM
D'ow !! The formatting on my table was Number instead of Text.
Thanks anyway CyberLynx (and other people who have read this)