kadrleyn's Profile
Expert
1250
Points

Questions
2

Answers
3

  • Expert Asked on June 14, 2017 in VBA.

    Hi,

    I would recommend you to examine the following example :

    Excel Advanced Userform & More Faster Data Searching Method

    • 161 views
    • 1 answers
    • 0 votes
  • Expert Asked on July 4, 2016 in VBA: Programming.

     Ago in the same folder with the Excel Workbook, “records” named text file is created. Later the data are transferred into text file as separated by spaces.

    RE: VBA READ FROM EXCEL AND WRITE TO A TEXT FILE

    Sample can be examined at the following page : Transferring Data To The Text File

    • 492 views
    • 2 answers
    • 0 votes
  •  New folder (if folder doesn’t exist) is created at the same place with workbook.

     

     

     

    The workbook’s sheets as new workbooks are copied in this folder.

     

     

     

    RE: VBA to copy sheets in a location

     

     

     

     

     

    Sub createfolder()
     Dim Sheet As Worksheet, SheetName$, MyFilePath$, N&
     Application.ScreenUpdating = False
     MyFilePath$ = ActiveWorkbook.Path & "\" & _
     Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4)
     With Application
     .ScreenUpdating = False
     .DisplayAlerts = False
     On Error Resume Next
     MkDir MyFilePath
     For N = 1 To Sheets.Count
     Sheets(N).Activate
     SheetName = ActiveSheet.Name
     Cells.Copy
     Workbooks.Add (xlWBATWorksheet)
     With ActiveWorkbook
     With .ActiveSheet
     .Paste
     .Name = SheetName
     [A1].Select
     End With
     
    .SaveAs Filename:=MyFilePath _
     & "\" & SheetName & ".xls"
     .Close SaveChanges:=True
     End With
     .CutCopyMode = False
     Next
     End With
     Sheets(1).Activate
     Application.ScreenUpdating = True
     MsgBox "The Process Was Carried Out Successfully", vbInformation
     
    End Sub

     

     

     

    Working Template Can Be Downloaded Here

     

     

     

     

    • 318 views
    • 2 answers
    • 0 votes