Forum Discussion

Rajeev_Raghavan's avatar
Rajeev_Raghavan
Copper Contributor
Apr 01, 2020

Print data to multiple files

Sub datatobat()

Dim ws As Worksheet
Set ws = ActiveSheet

Open "C:\Users\jeevan\Desktop\move.bat" For Output As 1
Range(ActiveCell, ActiveCell.End(xlDown)).Select
Do Until ActiveCell.Value = ""
Print #1, ActiveCell.Value
ActiveCell.Offset(1, 0).Select

 

Loop

Close (1)

End Sub

 

This is working very well, but at the same time I need to transfer the data from the third  ("C") column in to 

"C:\Users\jeevan\Desktop\return.bat" file 

 

 

 

No RepliesBe the first to reply