Posted By

RogerSpencelayh on 11/27/10


Tagged


Versions (?)

Import Workbook


 / Published in: Visual Basic
 

  1. '-------------------------------------------------------------------------------
  2. ' Comment description.
  3. '-------------------------------------------------------------------------------
  4.  
  5. Workbooks.Open Filename:=ThisWorkbook.Path & "\" & cStrWorkbookName
  6. strWindowName = ActiveWindow.Caption
  7. ' SheetName.Select
  8. Range("A1").CurrentRegion.Copy
  9. ThisWorkbook.Activate
  10. SheetName.Select
  11. Range("A1").Select
  12. ActiveSheet.Paste
  13. Application.CutCopyMode = False
  14. Windows(strWindowName).Close SaveChanges:=False

Report this snippet  

You need to login to post a comment.