I have the following code, it some what redundant i think, wandering if there is a shorter way to accomplish this and check to see if the value being copied is numeric if it is not write a 0 otherwise copy the number in the cell
I write each row every minute from a rtd script
thanks shawn
Sub stock1()
Open "C:\users\shawn browne\desktop\stock\stock1.txt" For Append As #1
Print #1 , Now() & " ,";
Print #1 , Sheets(1).Range("a4") & ",";
Print #1 , Sheets(1).Range("b4") & ",";
Print #1 , Sheets(1).Range("c4") & ",";
Print #1 , Sheets(1).Range("d4") & ",";
Print #1 , Sheets(1).Range("e4") & ",";
Print #1 , Sheets(1).Range("f4") & ",";
Print #1 , Sheets(1).Range("g4") & ",";
Print #1 , Sheets(1).Range("h4") & ",";
Print #1 , Sheets(1).Range("i4") & ",";
Print #1 , Sheets(1).Range("j4") & ",";
Print #1 , Sheets(1).Range("k4") & ",";
Print #1 , Sheets(1).Range("l4") & ",";
Print #1 , Sheets(1).Range("m4") & ",";
Print #1 , Sheets(1).Range("n4") & ",";
Print #1 , Sheets(1).Range("o4") & ",";
Print #1 , Sheets(1).Range("p4") & ",";
Print #1 , Sheets(1).Range("q4") & ",";
Print #1 , Sheets(1).Range("r4") & ",";
Print #1 , Sheets(1).Range("s4") & vbCrLf;
Close #1
End Sub
I write each row every minute from a rtd script
thanks shawn
Sub stock1()
Open "C:\users\shawn browne\desktop\stock\stock1.txt" For Append As #1
Print #1 , Now() & " ,";
Print #1 , Sheets(1).Range("a4") & ",";
Print #1 , Sheets(1).Range("b4") & ",";
Print #1 , Sheets(1).Range("c4") & ",";
Print #1 , Sheets(1).Range("d4") & ",";
Print #1 , Sheets(1).Range("e4") & ",";
Print #1 , Sheets(1).Range("f4") & ",";
Print #1 , Sheets(1).Range("g4") & ",";
Print #1 , Sheets(1).Range("h4") & ",";
Print #1 , Sheets(1).Range("i4") & ",";
Print #1 , Sheets(1).Range("j4") & ",";
Print #1 , Sheets(1).Range("k4") & ",";
Print #1 , Sheets(1).Range("l4") & ",";
Print #1 , Sheets(1).Range("m4") & ",";
Print #1 , Sheets(1).Range("n4") & ",";
Print #1 , Sheets(1).Range("o4") & ",";
Print #1 , Sheets(1).Range("p4") & ",";
Print #1 , Sheets(1).Range("q4") & ",";
Print #1 , Sheets(1).Range("r4") & ",";
Print #1 , Sheets(1).Range("s4") & vbCrLf;
Close #1
End Sub