You can use Format statement for this purpose, for example Format(UNZIP_SIZE, "#,##0", FINAL_FILE_BYTE_SIZE) : I am trying to take a number variable and send the value to a string with the : number formatted with commas. : EX: Let's say that the file size of BLAH.txt is 100,500,300 bytes... : DIM FINAL_FILEPATH, STRING "C:\\WINDOWS\\DESKTOP\BLAH.TXT\" : DIM UNZIP_SIZE, NUMBER : DIM FINAL_FILE_BYTE_SIZE, STRING : FILESIZE( FINAL_FILEPATH, UNZIP_SIZE ) : --> now the variable UNZIP_SIZE should contain a NUMBER value of : 100500300. : SET FINAL_FILE_BYTE_SIZE, UNZIP_SIZE : --> now the variable FINAL_FILE_BYTE_SIZE should contain a STRING value of : 100500300. : Question: How can I make the string value in FINAL_FILE_BYTE_SIZE be : displayed as 100,500,300? : I see in the help docs that the comma "," format symbol can be : used. But how? Essentiall what I want to do is similar to pressing the : button in MS Excel to convert a number from general to comma formatted. : Thoughts? : Here is what Help gave for info on it... : Thanks, : SM : ********HELP******* : , (comma) Thousands separator. If the format contains commas separated by #'s : or 0's, the number is output with commas separating thousands. A comma : following a placeholder scales the number by a thousand. For Example, the : format 0, scales the number by 1000 (e.g., 10,000 would be converted as : 10).
|