×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

changes format

changes format

changes format

(OP)
I have a macro that works pretty well. The only thing I'm having issues with, is occasionally, it changes the number I want to put in, to 001.#INF.

For example, I try to have it put in 6E409251, and it changes it to 001.#INF. My macro is set up to pop up a box, stating that the number is wrong and giving me a chance to fix it, but if possible I would like to avoid the box popping up.

I format my excel file as text, and then save it as a csv.

Any assistance would be greatly appreciated.

RE: changes format


hi,

So are you entering NUMBERS in Scientific Notation? If so, 6E409251 is a pretty HUGE number!!!

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: changes format

(OP)
I'm not sure why it's doing it.

Anything (or almost anything), that has an E as the second character does it. If my file is formatted as text, why does attachmate change the formatting?

RE: changes format


A TEXT file, which is what a .csv file is, has NO FORMATTING. It only has TEXT values.

Can you open the .csv in NOTEPAD and inspect the data, because I suspect that Excel may be doing something to your data.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: changes format

(OP)
I was hoping that you were right, but opening the file in notepad, shows the number the correct way.

RE: changes format

(OP)
Never mind. I got it. I added Dim account as string to the macro and it seemed to work.

Whoo hoo!!

RE: changes format



What happened, before you declared your account variable as string, it assumed it was a variant, and as a variant, probably assumed that your assigned value was a NUMBER and not a STRING. TILT!!!

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close