Sub importnotepad()
On Error GoTo errhl
Dim notepadfile
notepadfile = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please select text file...")
Workbooks.OpenText FileName:=notepadfile, Origin:=xlWindows, StartRow:=1
With ActiveWorkbook
ActiveSheet.Move After:=.Worksheets(.Worksheets.Count)
End With
errhl:
Exit Sub
End Sub
Showing posts with label Import data from notepad. Show all posts
Showing posts with label Import data from notepad. Show all posts
Wednesday, July 14, 2010
Subscribe to:
Posts (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
-
If you want to run SQL queries within Excel environment without connecting to any database, you can do it with creating the ADODB conn...
-
Macro to send b'day message automatically Snapshot of email: Snapshot of data: Method 1 Add image using web lin...