On 4/6/2010 8:34:13 AM, uscqfjcg wrote:
>Thank you; your function do
>exactly what I need. I
>put it in to my worksheet and
>create a group of data
>files with file names
>different for each one,
>automatically generated.
>Great!! Editing the script
>of your function I change the
>"Delimiter" from
>"vbTab" to the space
>character, that is more
>friendly with the program
>(Gaussian, a program for
>doing Computational Chemistry
>calculations) that
>will use these data files.
>Nevertheless, the data
>files saved with that function
>use "," as decimal
>separator, how can I change it
>to "." the decimal
>point?
vbScript uses your regional settings for formatting.
Insert the following line in the script before the file is written:
CurrentLocale = SetLocale("en-us")
After the file is written insert the line
SetLocale(CurrentLocale)
You could do away with the CurrentLocale variable if you specifically set the locale back to Spain after writing the file:
SetLocale("es-es")
But I don't recommend it. If you give the script to anyone in another country you will mess up their regional settings! Also bear in mind that if the script crashes in the middle it could leave your regional settings changed.
>And one more question, can I
>have a list of files
>that are in a directory (in
>the current one or in
>any other folder) from inside
>a Mathcad worksheet?
>Thank you again,
Yes, with another scripted component.
Richard