Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Dim MyFileName As String
  2. Dim CurrentWB As Workbook, TempWB As Workbook
  3.  
  4. Set CurrentWB = ActiveWorkbook
  5. ActiveWorkbook.ActiveSheet.Range("my named range").Copy
  6.  
  7.  
  8. Set TempWB = Application.Workbooks.Add(1)
  9. With TempWB.Sheets(1).Range("A1")
  10. .PasteSpecial xlPasteValues
  11. .PasteSpecial xlPasteFormats
  12. End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement