M
Mr. Smiley
Please review the code below. It works. The only probelm is instead of
printing out the value of each cell, one line at a time, I wondered if anyone
knew how to write this code so that it would print the values in every cell
of column u. Thanks
Sub Test()
Dim myFileName As String
Dim FileNum As Long
myFileName = "C:\Documents and Settings\us044628\Desktop\RQN.qmc"
FileNum = FreeFile
Close FileNum
Open myFileName For Output As FileNum
Print #FileNum, ActiveSheet.Range("u1").Text
Print #FileNum, ActiveSheet.Range("u2").Text
Print #FileNum, ActiveSheet.Range("u3").Text
Print #FileNum, ActiveSheet.Range("u4").Text
Print #FileNum, ActiveSheet.Range("u5").Text
Print #FileNum, ActiveSheet.Range("u6").Text
Print #FileNum, ActiveSheet.Range("u7").Text
Print #FileNum, ActiveSheet.Range("u8").Text
Print #FileNum, ActiveSheet.Range("u9").Text
Print #FileNum, ActiveSheet.Range("u10").Text
Print #FileNum, ActiveSheet.Range("u11").Text
Print #FileNum, ActiveSheet.Range("u12").Text
Print #FileNum, ActiveSheet.Range("u13").Text
Print #FileNum, ActiveSheet.Range("u14").Text
Print #FileNum, ActiveSheet.Range("u15").Text
Close FileNum
End Sub
printing out the value of each cell, one line at a time, I wondered if anyone
knew how to write this code so that it would print the values in every cell
of column u. Thanks
Sub Test()
Dim myFileName As String
Dim FileNum As Long
myFileName = "C:\Documents and Settings\us044628\Desktop\RQN.qmc"
FileNum = FreeFile
Close FileNum
Open myFileName For Output As FileNum
Print #FileNum, ActiveSheet.Range("u1").Text
Print #FileNum, ActiveSheet.Range("u2").Text
Print #FileNum, ActiveSheet.Range("u3").Text
Print #FileNum, ActiveSheet.Range("u4").Text
Print #FileNum, ActiveSheet.Range("u5").Text
Print #FileNum, ActiveSheet.Range("u6").Text
Print #FileNum, ActiveSheet.Range("u7").Text
Print #FileNum, ActiveSheet.Range("u8").Text
Print #FileNum, ActiveSheet.Range("u9").Text
Print #FileNum, ActiveSheet.Range("u10").Text
Print #FileNum, ActiveSheet.Range("u11").Text
Print #FileNum, ActiveSheet.Range("u12").Text
Print #FileNum, ActiveSheet.Range("u13").Text
Print #FileNum, ActiveSheet.Range("u14").Text
Print #FileNum, ActiveSheet.Range("u15").Text
Close FileNum
End Sub