Download Excel 2016 VBA Code: Just Copy – Paste – Run (For Accountant) Part -2

Excel having large collection of functions in-built . Mostly those functions are sufficient to complete the work. Sometimes, Excel doesn’t have a pre-built function that suits a specific need, Well not to worry about it , you can create your own function called User Defined Function or custom Excel function with help of Visual Basic for Applications (VBA). You can access a User Defined Function any time just like any other Excel function.
But the main problem is you should have good knowledge of Excel VBA Programming and need so much time to writing code as desire.
This book helps you to use ready code by just copy paste and enjoy the work.
Benefits of this books :
•Available readymade function which is very unique and rare.
•Create new formula in easy way instead of using long formula
•Without any technical knowledge use the new function
•Impress your boss with fast working
•Earn 10000$ per month by making new project with help of my other book “Ready to Use 101 Powerful Excel VBA Code”

Insert Multiple Text file in Worksheet ready vba code

Sub MulipleTextFiles()
‘SmartCode for Insert Multiple text file in worksheets
‘SmartExcel(www.anilnahar.com)

Dim xFilesToOpen As Variant
Dim I As Integer
Dim xWb As Workbook
Dim xTempWb As Workbook
Dim xDelimiter As String
Dim xScreen As Boolean
On Error GoTo ErrHandler
xScreen = Application.ScreenUpdating
Application.ScreenUpdating = False
xDelimiter = “|”
xFilesToOpen = Application.GetOpenFilename(“Text Files (*.txt), *.txt”, , “Smart Excel”, , True)
If TypeName(xFilesToOpen) = “Boolean” Then
MsgBox “No files were selected”, , “Smart Excel”
GoTo ExitHandler
End If
I = 1
Set xTempWb = Workbooks.Open(xFilesToOpen(I))
xTempWb.Sheets(1).Copy
Set xWb = Application.ActiveWorkbook
xTempWb.Close False
xWb.Worksheets(I).Columns(“A:A”).TextToColumns _
Destination:=Range(“A1″), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, _
Comma:=False, Space:=False, _
Other:=True, OtherChar:=”|”
Do While I < UBound(xFilesToOpen)
I = I + 1
Set xTempWb = Workbooks.Open(xFilesToOpen(I))
With xWb
xTempWb.Sheets(1).Move after:=.Sheets(.Sheets.Count)
.Worksheets(I).Columns(“A:A”).TextToColumns _
Destination:=Range(“A1”), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, _
Comma:=False, Space:=False, _
Other:=True, OtherChar:=xDelimiter
End With
Loop
ExitHandler:
Application.ScreenUpdating = xScreen
Set xWb = Nothing
Set xTempWb = Nothing
Exit Sub
ErrHandler:
MsgBox Err.Description, , “SmartExcel(www.anilnahar.com)”
Resume ExitHandler
End Sub