Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File dropping leading zeros when imported into Excel

Status
Not open for further replies.
Jun 16, 2000
199
US
Hi.

I am relatively new to VB and VBA and need some assistance.

I have a macro written in VBA that calls an exported txt file. This macro brings the exported file into excel and does some manipulation. The problem that I am having is that when the export file is brought into excel, the leading zeros of a job number are dropped off. The leading zeros are in the export file; however, I need them to stay when I import them into excel.

Can someone give me some help/hints?

Thank you!
Angela
 
I believe you will need to define that column as having "TEXT" rather than the default "General". If you need to know how to set it then just record a macro while you set a column to "TEXT" in a dummy workbook, stop recording and go look at the generated code in the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top