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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting issue 1

Status
Not open for further replies.

xxentric

Technical User
Oct 14, 2009
35
0
0
US
If i have info in excel formatted as text the info looks like this 12-1 or 10-2 it needs to be formatted as text so it is displayed like that, otherwise by default it turns into a date....

im having an issue here where if i use the code below to that that info as a csv file, in the csv it auto changes that ifo to dates on me...... i wish that microsoft wouldnt assume they know what i want... any way around this?

Code:
     Sheets("Sheet2").Copy
     ThisFile = Range("C3").Value
     ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\chipfab\Desktop\Jared FC Project\Runsheets\FC Runs\Finished Runs\" & ThisFile, FileFormat:=xlCSV, CreateBackup:=False
     ActiveWorkbook.Close
     MsgBox "Run Saved"
 

hi,
in the csv it auto changes that ifo to dates on me
Rather than opening the .csv file with Excel, open Excel first and Data > Import the file. This method give you much more control over the columns. You can specify the column as TEXT.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
ah thank you, that would be a good way to do it too, ill have to keep that handy. thanks!
 


It's really the ONLY way to do it if you have data like 12-1.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top