I'm currently using a VBA macro to gather cell data and transfer the data to a notepad text file. My macro works great but unfortunately if a cell is empty the notepad will add space to the text file. How can I eliminate the empty cells causing spaces in the text file?
My current macro is as follows:
Sub data_out_save_S1414()
Dim iCntr
Dim strFile_Path As String
strFile_Path = Range("fo1")
Open strFile_Path For Output As #1
For iCntr = 5 To 1514
Print #1 , Range("h" & iCntr)
Next iCntr
Close #1
CreateObject("WScript.Shell").Popup "Your data is now saved as a NotePad file.", 3
End Sub
Thank you in advance for your ideals or suggestions.
"Bubba"
My current macro is as follows:
Sub data_out_save_S1414()
Dim iCntr
Dim strFile_Path As String
strFile_Path = Range("fo1")
Open strFile_Path For Output As #1
For iCntr = 5 To 1514
Print #1 , Range("h" & iCntr)
Next iCntr
Close #1
CreateObject("WScript.Shell").Popup "Your data is now saved as a NotePad file.", 3
End Sub
Thank you in advance for your ideals or suggestions.
"Bubba"