Saturday, November 9, 2013

Open a delimit notepad file in Excel

Macro to open a delimit notepad file in Excel

Sub delimit_txt_file()

Dim fNameAndPath As String
fNameAndPath = Application.GetOpenFilename(FileFilter:="Text Files (*.txt), *.txt", Title:="Select File To Open")

Workbooks.OpenText Filename:=fNameAndPath, Origin:=xlWindows, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=True, OtherChar:="!" ' choose ur delimit type here

End Sub


  1. You blog is eye-catching. I get pleasure from it. Thanks for sharing this beautiful piece of writing with me.
    dashboard designer

  2. here is a site for easy macro learning

  3. This post will talk about how I boiled down the information in the blog to connect my Azure VMs to this Azure File file storage


Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...