Month: March 2016

Write File from excel

Sub WriteFile() Dim strPath As String strPath = “C:\\temp\\” & “filename.txt” Dim fso As Object Set fso = CreateObject(“Scripting.FileSystemObject”) Dim oFile As Object Set oFile = fso.CreateTextFile(strPath) oFile.writeLine sInsert For i = 2 To 100 ‘#loopCount oFile.writeLine “pankaj” Next oFile.Close Set fso = Nothing Set oFile = Nothing MsgBox (“Done”) End Sub Read more →