Hi everyone!
I have looked up this problem in old threads and can't find an answer that I can get to work. This is the closest I've come: http://www.vbforums.com/showthread.p...cel+sequential
I'm working on creating an excel output from a VB6 program.
For the following code, I would like to specify the cell that the information in each line should be written to. Even better, I'd like to be able to put parts of each line in separate cells (e.g., the string "Subject age" in column 1 and the value "24" in column 2).
Can anyone shed some light on how to do this? It must be simple, but I'm very inexperienced. I'd greatly appreciate any tips. "File_Name", "age" etc. are obviously variables defined elsewhere in the program. The above code works fine for creating an excel file as a list.Code:Private Sub Command1_Click() Open File_Name & ".xls" For Output As #1 Write #1, "STAGE 1A" Write #1, "Subject name: " & Subject_Name Write #1, "The file name: " & File_Name Write #1, Write #1, "DEMOGRAPHICS" Write #1, "Subject age: " & age Write #1, "Subject gender: " & gender Write #1, "Subject ethnicity: " & ethnicity Write #1,
Many thanks for taking the time!




Reply With Quote
