Skip to main content

Posts

Featured

HOW TO EXPORT TEXT FILE IN EXCEL USING VBA CODE 1st Insert module then copy past below code. Sub test() Dim myFile As String lr = Cells.Find("*", SearchDirection:=xlPrevious).Row Path = ActiveWorkbook.Path myFile = Path & "\aaa.txt" TextFile = FreeFile Open myFile For Output As TextFile For i = 1 To lr Print #TextFile, Range("A" & i).Value, Print #TextFile, Range("B" & i).Value Next Close #TextFile End Sub

Latest Posts

Excel Code : Editing for specific time period

My Add-Ins For Excel 2010

onEdit Function for Google Sheets