Results 1 to 4 of 4

Thread: Making new EXCEL file with value only by copy from other excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Option Explicit
    Sub CopyWorksheetValues()
        Dim ws As Worksheet
        Dim WS_Count As Integer
        Dim I As Integer
        Dim folderPath As String
        folderPath = Application.ThisWorkbook.Path
        Worksheets(Array("Keep1", "Keep2")).Copy
        With ActiveWorkbook
        WS_Count = .Worksheets.Count
            For I = 1 To WS_Count
            .Sheets(I).UsedRange.Value = .Sheets(I).UsedRange.Value
            Next
         .SaveAs Filename:=folderPath & "\New3.xlsx", FileFormat:=xlOpenXMLWorkbook
         .Close SaveChanges:=False
        End With
    End Sub
    Finally i got it works but how can i make it generate 3 excel instead of one
    Last edited by tendosai; 05-18-2020 at 08:22 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •