rafi_07max
12-13-2010, 12:14 AM
I have a workbook with many sheets.
What I wanted to do is save a particular sheet by the name of “board” into .txt file
I used the following codes:.
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("board")
ws.Copy
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="txt Files (*.txt), *.txt")
If fileSaveName <> "False" Then
ActiveWorkbook.SaveAs fileSaveName
End If
End Sub
So once I saved the file and when I reopen the file using excel some of the contents in a cell were missing.
Take a look at the image below:
http://www.iimmgg.com/image/28bfd5d87093e8f9050af73fa6c540f9
How can I prevent the data from missing?
I have attached a sample workbook
5076
What I wanted to do is save a particular sheet by the name of “board” into .txt file
I used the following codes:.
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("board")
ws.Copy
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="txt Files (*.txt), *.txt")
If fileSaveName <> "False" Then
ActiveWorkbook.SaveAs fileSaveName
End If
End Sub
So once I saved the file and when I reopen the file using excel some of the contents in a cell were missing.
Take a look at the image below:
http://www.iimmgg.com/image/28bfd5d87093e8f9050af73fa6c540f9
How can I prevent the data from missing?
I have attached a sample workbook
5076