Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




[SOLVED] Converting Number To Wording


I used to know how, but I lose these code. please someone help me...

Thank in advance

p.s. I mean function to convert "1520" to "ONE-THOUSAND AND FIVE HUNDRED TWENTY"




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Text1 Number > Text2 Number Error After 2 Digis Use(solved)
Umm, this a weird error it I amtrying to compare two numbers in each box,

so it will be something like this

If text1 > text2 then
msgbox "too large"
End if

But the weird thing is after the number hit two digits lets say over 10 and up then I get errors, even if the number in text2 is larger this only happens after it goes over 10

weird is there a better wayt to compare number that is more reliable or do i need to add something to the code

Thanks

Converting A Number To Its Binary Number
I want to convert a number to its corresponding binary number.
Eg:

105 = '1101001'

How do I do?

Thanks!

Converting App From Jet To MSDE - Please Some Tips [SOLVED]
I'm thinking of converting my application from Access 2002 Jet to MSDE mainly to be able to embed the database into the application instead of having an .mbd that the users can open. The Access DB has information and formulas that if modified can cause the app to not work properly and besides I'd prefer that the users cannot see these formulas or "logic rules" designed for my app. (even if I protect the access db with a password)


I'm doubting because I don't know anything about MSDE.... if read the article "Using Microsoft Access 2002 with MSDE 2000" but still..

For example: will the queries that I have to read of the access db work the same or do I have to change the syntax?


 - Which string do I have to use instead of cn.Provider = "Microsoft.Jet.OLEDB.4.0"?

 - will I have password or security issues when trying to connect?

 - will the tables, field names, types etc. be the same?

 - How do I include the MSDE database to my installation files? (using Visual Installer)


I read the FAQ on MSDE Beginners guide but the example is for .NET... anyway any simple instructions and guidelines for the conversion?

My app is almost finished and I'm afraid I could run into complications if I move to MSDE unless it's rather simple....

any comments will be useful

Thanks





_________________________________________________________________

Edited by - vbprog1144 on 9/2/2005 9:31:30 PM

Re Wording? :(((((
Private Sub Form_Load()
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "CRX" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image13
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "Civic" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image11
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "Accord" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image10
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "Civic Hatchback" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image12
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "Del Sol" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image14
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "Integra GSR" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image8
Else
If Garage.Text12.Text = "1" Then
If Garage.Text1.Text = "NSX" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image9
Else

If Garage.Text1.Text = "NSX" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image7
Else

If Garage.Text1.Text = "Integra GSR" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image6
Else

If Garage.Text1.Text = "Civic" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image3
Else

If Garage.Text1.Text = "Accord" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image1
Else

If Garage.Text1.Text = "Civic Hatchback" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image2
Else

If Garage.Text1.Text = "Del Sol" Then
hp.Text = Garage.Text2.Text
Text4.Text = Garage.Text5.Text
Randomize
Image1 = CarPics.Image5
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub


I need this reworded some how so it works. It doesnt like 2 if thens after eacher other. And it wont goto the next etc. Please help i need this fixed fast.

Show Temporary Wording
I apologize for being so vague. I'm not sure how to search on this question in this site.

Basically, I want to show wording for a short period of time (maybe 2 or 3 seconds) while events are happening in the background. At first, I tried a Label with a caption, but it never showed-up. Next, I tried a separate form (actually, a frmSplash). That works fine, but I can't get the background events to continue while the frmSplash is open. Below is my code for that piece:

Code:
frmSplash.Show
DoEvents
Start = Timer
Do Until Timer >= Start + 1.5
Loop
frmSplash.Hide

With this code, the events on my main form wait for the frmSplash to finish.

Any and all suggestions would be greatly appreciated!!!

Blink The Text Wording
is there any way that i can program to make those text in the text box to blink???? or to make those text move or..... (i want to caught the user attention )
is there any soure code for that????
please help
thank Q

Start With Windows Wording
just curious at to what wording people use when they have an option for their program to load with windows

Start with Windows
Load when Windows starts up

etc

Levels Of Backup (Wording For The Docs)
My program has a new feature where the user can select "Levels of Backup" from 0 to 8, where they can choose anywhere from no backing up of their file, up to 8 trailing backups . . .

Some how the wording of it just doesn't sound right to me - "Levels of Backup". I know you have "Levels of Undo", but something makes me think I can word this a bit more properly than "Levels of Backup".

Yes, you can get lost in the minutiae, and I often do, but is there a sharper term I can use for this feature?

Converting A Number Format
is there a way to convert a number like this "12:07:02" to this "12.07" using EXCEL Vb

ive tried format cell number etc that dont work is there a way to edit the cell contents or a way in which you can send key strokes in to a cell to remove the end 2 numbers and replace the ":" with a "."

Converting String To Number- A=1, B=2, C=3, Etc
Hey I was just wondering if anyone had any advice about converting a string to a number in the sense that a=1, b=2,c=3,d=4 and so on. I know how to do it with individual letters but now I need to do it with a long user-inputted string. Thanks!

Converting String To Number
hello!!! anyone knows on how to convert the string function into number and viceversa..thanks

Converting Text To Number
Hello!

I got following text string in cells I1 to I1000 "282.0320 ". (last character is space, and last characters after dot randoming 0000-0990)
Is there any easy way to convert it to number 282,0320 in to cells J1...J1000.

ps. I can make loop, but to number converting I need help.

Thanks!

Converting A Number To A Different Form
I need have converting a number to a different form.

ADx 'the 'x' is a lower subscript
-into binary form?
-into decimal form?

thanks!

Help Converting Number To Words
i'm working on program with receipt type printing. :
problem is coverting numbers to words

179.50 = one hundred seventy-nine and fifty cents



thxx

Converting Number To TIME
Hello,

I have a figure 139, i want to convert in into Time Format (HOURS and MINS)like "02:18".

Please help me

Farooq

Converting Four Bytes To One Number.
Given four bytes, how do I compile them all into one number?
For instance, we'll have 0 0 1 255, how am I to convert that into 256?










Added green "resolved" checkmark - Hack

Converting Number To Words
Hi All,

I wonder if anyone has gone through this one before.

I am looking for a module that would convert a numbered amount into the written worded amount. like with cheques.


Example: 1000 = one thousand.


Any help or suggestions welcomed.

Thanks in advance.

Elpower

TSQL Help On Converting Number
Hi vb experts!

I am using vb6 + sql2000. How can I convert a number (integer or decimal) to CHAR format, where the length is 12 and I have to fill the empty characters with 0s. Ex: 128 - 000000128,00 or 1223.2 - 000001223,20. I can write an algorithm to do that, but I'm pretty sure that there are easier ways. Thx for your help!

TSQL Help On Converting Number
Hi vb experts!

I am using vb6 + sql2000. How can I convert a number (integer or decimal) to CHAR format, where the length is 12 and I have to fill the empty characters with 0s. Ex: 128 - 000000128,00 or 1223.2 - 000001223,20. I can write an algorithm to do that, but I'm pretty sure that there are easier ways. Thx for your help!

Converting A Number's Format
Is it possible to have a number in a textbox lets say, someone enters 1201 and it is shown like 001201, or if someone enters 1 it should become 000001. It has to be six digits only....

Converting String To A Number
I'm writing a pogram, a simple one that calculates certain number -which works like this...

User enters any number in a textBox
and on click of the command button the number should be incremented by 1.

Its working but if I enter 001 into textbox it returns 2 on clicking command1...please help...I want it to be 002

Here's my code:
Dim nu As Long
nu = Val(Text1.Text)
MsgBox nu

Converting A Number To A String
I've been working with an active call center and I have been trying to convert a Variable (answer_phone) into text from a number, so I can access the MS access database. If anyone knows the command line for this please let me know.

Thanks alot
Marc Smith

Converting Number To Word
Hi

How to Convert Number to Words in vb6 .

Ex : if i enterd "1" the out of the one comes "one" please

Thanks

Converting Number To Text
I need to modify some code written by someone else that sends out an automated email based on a form submittal. In the form, values are set to 1 or 0 for "yes" or "no". I need to modify it so that the email changes the 1 or 0 to their text equivalents (yes/no). I CANNOT modify the form itself to change the variables, so i assume i need an IF stmt to that converts the string to text before it sends. Can someone point me in the right direction for how to do this?

Converting A Number To String
Hai
    I am having a textbox in which if i enter an number like 123 means it should display as Hundred and twenty three in indian format rupees.How can i do it.

Converting Date To Number
I'm trying to take a date, say "6-16-2004", and convert it via VB or API function to a serial number (872348289) That I can later convert back into "6-16-2004" via VB or API function.

Why? I need to store a date as .ItemData

I tried searching, but I can't think of keywords to give me anything relevant. Anyone have a Google query I can use?



Edited by - Metallisoft on 6/18/2004 10:15:19 AM

Converting Number To Words
Hi
I want to convert number like 157 to "one hundred fifty seven" is there any function in vb or on net which can do that.

thanks

saddy

Converting Number Of Characters To # Of Bytes
Hi All

I have an uploading application inside which i can get the total number of characters inside the file. Is there a way to convert this number of characters to # of bytes?

The number of characters could be anything plain text or control chars from within Excel docs etc..

Thanks
Kevin

Converting A Number Into A Graphical Representation Of It???
Hi

I want an input box with a user input

eg. 5

would then be represented by say

TTTTTTTTTT


or


5

could be

FFFFF

How can this be done!!!!


Thanks in advance

Tom

Converting Month String To Number
Hi all
Im trying to find an easyer way to write this code

Function Convert_Date_Str2Int(Date_Str As String) As Integer

Select Case Date_Str
Case "January"
Convert_Date_Str2Int = 1
Case "February"
Convert_Date_Str2Int = 2
Case "March"
Convert_Date_Str2Int = 3
Case "April"
Convert_Date_Str2Int = 4
Case "May"
Convert_Date_Str2Int = 5
Case "June"
Convert_Date_Str2Int = 6
Case "July"
Convert_Date_Str2Int = 7
Case "August"
Convert_Date_Str2Int = 8
Case "September"
Convert_Date_Str2Int = 9
Case "October"
Convert_Date_Str2Int = 10
Case "November"
Convert_Date_Str2Int = 11
Case "December"
Convert_Date_Str2Int = 12
End Select
End Function

its long and messey and im sure there is an easyer way to do it
also is there a way to do the opposite comvert a month number to a string..

Thanks ed

*resolved * Converting Date To A Number
Hi All,

I know that you can convert a date into a floating point number
via a variant type ( or so microsoft help says).

apparently, the left side of the '.' are the days and the right side is the time.


But I can't seem to do it.


What I want to do is to set up an expiry date of say:


12 june 2003 and convert it to a number eg: 2134



Then in my software, I just say : if int(Date) > 2134 then expired=true

Can anyone help me out on this?

I'd rather not use Datediff, I want to eliminate all date formatting etc..

Thanks in Advance

Chris B

Converting A Number To A Valid Time
Hello all,

I am horrible with math so I am hoping there is someone out there that can help me.

I am using the media player control in a form, and it has a property of CurrentPosition that returns the current point in the film in seconds.

The problem is that the seconds keep counting 100,101,102,103....

How do you convert this into minutes and seconds? If you divide 105 by 60 you get 1.75.

Is there an easy way to do this?

Thanks!!

Converting Number To Seconds And Minutes
This is what i want to do...

Im making an mp3 player, and i use the current position * the total length of the song divided by 100 which gives me the number it would be on. But the numbers are like 97.34 , and i just wanted to know how i could just convert that to 01:37. I tried all sorts of stuff, but what I tried didnt work for me. Any suggestions? (if you are going to say , just run a timer that counts how long the song has been playing, i dont want to do that because if the user fastforwards or rewinds in the song, it will be totally off.)

Converting Whole Number In Sec To Time Format
How would you convert a whole number in seconds like 2525353 to be in the hh:mm:ss format? I have tried using format and it doesnt convert it correctly any help?

Lowering The Number Of Colors And Converting To Jpg
Hi
I need to send a picture over the internet in my prog,so:
I need to lower the number of colors to 16 (to make the image smaller)
and convert the picture to jpg (to make it as small as i can)

i got my picture in a picturebox,so how do i do that?
thx

Excel: Converting Column Number To Name
I have a problem I just can get figured out (maybe because it's so late).

I need to find a way to convert a column number to the character form.
Ok, I will give an example, 1 -> A, 2 -> B, 52 -> AZ, ... you get the point. So I came up with this brilliant idea (not really) to treat it in about the same way you would treat conversion from binary to hex, but using a 26-based-like system in stead of a 16-based. At first, all look good, but after some testing, I got some errors with multiples of 26 (not including 26 itself). I think the problem is that my system does not has a zero equvalent. After AZ must come BA, not B0 <- B-ZERO.
Any suggestions

public Function XLCol(byval iCol as Long) as string

Dim lvl as Integer
Dim r as Long
Dim cpos as string
Dim strABC as string

strABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

lvl = 0

Do Until 26 ^ (lvl + 1) > iCol
r = iCol Mod (26 ^ (lvl + 1))
cpos = mid(strABC, r, 1) & cpos
iCol = iCol - r
lvl = lvl + 1
Loop

cpos = mid(strABC, iCol / (26 ^ lvl), 1) & cpos

XLCol = cpos

End Function




Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

Converting A Decimal Number To Binary
In my code I have convert numbers from Decimal to Binary and vice versa.

I have done the Binary to Decimal conversion but I am having trouble doing it the other way.

There is a HEX and an OCT function but no Binary function.

I'm sure there is something simple I am missing, can anyone help.

Thanks for your time.

SB

Converting Decimal Number To Binary Form
How do I convert let's say decimal number 134 to binary form 10000110? And then how I manipulate the "bits" because after that converting the number is in second complement form and if it starts with "1" it's a negative number? So basically how do I make the converting from decimal to binary? Thanks!

[SOLVED]Chr(number) And Variable
how would i make it say all the Ascii keys only 1 - 130? in the textbox..
i tried this, but didnt know how i would put a varible in the Chr() line
help please, im new to VB6 , heres what i tried, but dont work
i only get 1 character, strange one like | or something....
EDIT: yea, im only getting the Chr(130)

VB Code:
Dim chrnumber As Byte Private Sub Form_Load()chrnumber = 0For i = 1 To 130chrnumber = chrnumber + 1txttest.Text = Chr(chrnumber)Next iEnd Sub

X/y And Getting A Whole Number As Result (solved)
Hello..

I use following code:


VB Code:
dim intAantal as integerintAantal = 962/365msgbox(intAantal)



actually this is 2,6... but is shows 3 in the msgbox..

You would expect that I would like to show 2,6... but I want it to show 2..

Everything behind the , cut out..

How can I do a devision without VB rounds it for me?

greetz and tnx!

nickname

Help In Negative Number !!!**SOLVED**
guys,

i am now developing an inventory system using vb6. how to prevent the user from entering an negetive number?
let say entered -20 for the quantity(integer type). is there anyway to check for a negative number !!!????

thanks in advance.

*solved*How Can I Get A Whole Number In This Statement?
Hi Everyone...

Code:
strSQL = "Select DISTINCT [teeth Dia],[Drive Rest] From SPECIFICATIONS" 'Get all records from tblExample


If IsNull(rs("Drive Rest").Value) = False Then
    If Left$(Combo5.Text, InStr(Combo5.Text, " ") - 1) = rs("teeth Dia") Then
        Combo6.AddItem rs("Drive Rest").Value & " mm"
    End If
    End If


rs("Drive Rest") e.g. is in database as "28.1" i populate a combo and add " mm" to the end so its "28.1 mm".
How can i just add the whole number only so i get 28 mm in the combo box
Can i do this in a SQL statement?
i triedCode:If Left$(Combo5.Text, InStr(Combo5.Text, ".") - 1) didnt work too well..


---------------------------------------------------------------------------------------------------------------------------------
Todays random quote: I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances.

Martha Washington (1732 - 1802)
---------------------------------------------------------------------------------------------------------------------------------

Edited by - Hopeless on 11/16/2004 11:29:04 PM

Floor Value Of Number (solved)
Hi ,
(sorry for the question i'm a newbie in vba)
i want to get the floor value of certain number(double).
 i tried to use " " and also tried Cint - both return me the ceiling value

what do i do wrong ?
Thanx

 

Edited by - elad on 2/19/2004 1:50:23 AM

(solved)How To Count Number Of Folders?
as stated above...

i got error "'''' method or data member not found!!""
actually what is the correct way to detect the number of folder?


Code:
Private Sub Command1_Click()

Dim collFolders As Folders

collFolder.path = "C: esting2" '''' method or data member not found!!

If collFolders.Count > 3 Then
' MsgBox "No folders in collection"

MsgBox "got more than folders"

Else
MsgBox "folders less than 3"
' Exit
End If

End Sub

[SOLVED] Have A Number, Rearrange To The Biggest Possible
hi, im trying to rearrange a number to get the biggest possible...

i dont remember how to write to a string letter by letter (or number by number)

can you tell me if there's a vb function to do this? i just need the name

thx to everyone

SOLVED : Max Number Of Lines In A Textbox ?
First of all, Sorry to all of you. I had deletted this thread to fast by accident.
MartinLiss : I have read your reply, but it was to difficult for me, i dont realy understand that piece of code. Thanks anyway.


The problem i have is the following :

I need to set the maximum number of lines for a textbox.
The textbox i have must be limmited to 5 lines/rules so that the user cant type on and on when the 5 lines ar full.

Is there realy no easy way to do this ? or is there a other textbox with this function ?

(It's just the same idea as that you can set the maxlengt, but now i need to set the maxlines)

I hope one of you can help me with this.

SOLVED : Serial ID(auto Number)
how i can arrange the ID numbers in ascending order .

when i delete a record ... the id serial number cannot be chnged in serial order ... it still as it is ..



thnx

SOLVED ** How Can I Limit The Number Of Records With This Sub
Hi there,

i've written this nifty sub that populates a list box dynamically as you type.

i've tried adding LIMIT 20 to the end of the statement but it didn't work.

i don't want to have to wait for it to dump thousands of names into the list box.

here's the code, any help on the select would be appreciated.



Private Sub txtwildname_Change()
Dim strwildname As String

strwildname = "*" & txtwildname.Text & "*"
listwildname.Visible = True
Me.listwildname.RowSource = ""
listwildname.RowSource = "SELECT DealerName FROM Dealers where DealerName like '" & strwildname & "' order by DealerName asc"

End Sub



cheers



Edited by - portaloo on 8/9/2006 9:17:01 AM

Solved: Increment About Form Version Number
Happy holidays!!

Can someone explain how to increment the About form version number? It just stays at 1.1.0. Other than not incrementing the form looks just fine. The code in the About form includes...
Code:
Private Sub Form_Load()
    Me.Caption = "About " & App.Title
    lblVersion.Caption = "Version " & App.Major & "." & App.Minor & _
                           "." & App.Revision
    lblTitle.Caption = App.Title
    lblDescription.Caption = "This program was written by ...blah blah"
    lblDisclaimer.Caption = "Warning: ...This program is protected ....blah"
End Sub

..but there is also under - project properties - make, the version number Major, Minor, Revision.
I have them each set to 1. And, the Auto increment is checked. But, I'm not sure about under Application the Title and Icon part. The drop down for the Icon just lists all the different forms I have in this project. I don't think of a form as an icon what am I missing here?

Under Version Information Type there are entries like comments, company name, file description and so on. What are these for?

Forgive my ignorance I realize this ain't rocket science. Maybe it's the triptophan kicking in.

thanks for any help
Hal



Edited by - Hal on 11/29/2003 7:57:44 PM

Copyright © 2005-08 www.BigResource.com, All rights reserved