Guest User

Untitled

a guest
Jul 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. myFile = Application.GetOpenFilename(, , "Browse for Workbook")
  2. Set tws = Workbooks.Open(myFile)
  3.  
  4. Public tws As Workbook
  5.  
  6. myFile = Application.GetOpenFilename(, , "Browse for Workbook")
  7. Set tws = Workbooks.Open(myFile)
  8.  
  9. LastrowTar = tws.Worksheets(2).Cells(Rows.count, 2).End(xlUp).Row
  10. Set tarRng = tws.Worksheets(2).Range("B3:B" & LastrowTar)
  11.  
  12. Sub getFile()
  13. myFile = Application.GetOpenFilename(, , "Browse for Workbook")
  14. Set tws = Workbooks.Open(myFile)
  15. End Sub
Add Comment
Please, Sign In to add comment