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:.
[vba]
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
[/vba]
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/28bfd5d8...0af73fa6c540f9
How can I prevent the data from missing?
I have attached a sample workbook
Attachment 5076