Guest User

Untitled

a guest
Dec 11th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Sub UploadData()
  2.  
  3. Dim Model As Workbook
  4. Dim Q As Workbook
  5. Dim rngFX As Range
  6. Dim Year As String
  7.  
  8. Set Model = ActiveWorkbook
  9.  
  10.  
  11. Set Q = Workbooks.Open(Filename:=Sheets("Instructions").Range("$C$29").Value)
  12.  
  13. Month = ("C" & (Model.Sheets("Instructions").Range("$C$23")))
  14.  
  15. With Q
  16. With .Sheets(Month & " Summary")
  17. Set rngFX = .Range("A61:R66")
  18. rngFX.Copy Destination:=Model.Sheets("FOREX Forecast").Range("A3")
  19. End With
  20. End With
  21.  
  22. Q.Close savechanges:=False
  23.  
  24. With Model.Sheets("FOREX Forecast").UsedRange
  25. .Value = .Value
  26. End With
  27.  
  28. End Sub
Add Comment
Please, Sign In to add comment