Formatting error with .OpenTextFile

Results 1 to 2 of 2

Thread: Formatting error with .OpenTextFile

  1. #1
    Join Date
    Dec 1969

    Default Formatting error with .OpenTextFile

    Hello, <BR><BR>I am writing data through access to an excel spreadsheet using the .OpenTextFile to open the FileSystemObject. I basically load all of the database values into a variable and then .Writeline the file. Everything is working fine except that excel is stripping the leading zeros of my zip codes (in the boston area). I was wondering how to correct this problem. Thanks alot,<BR><BR>Jeff Dimaria

  2. #2
    Join Date
    Dec 1969

    Default RE: Formatting error with .OpenTextFile

    It&#039;s the way Excel treats the numbers. What you want is Excel to treat your zip code like text not a number. To do that put a single quote &#039; in front of the zip code. It will not show up in Excel put it will allow you to keep the leading 0.<BR><BR>Tim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts