Guest User

Untitled

a guest
Jun 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. Sub DemoIt()
  2.  
  3. 'open excel and vbe windows side-by-side
  4. ' to see results when break points hit
  5.  
  6. 'setup values
  7. Range("A1").Select
  8. ActiveCell.FormulaR1C1 = "A"
  9. Range("A2").Select
  10. ActiveCell.FormulaR1C1 = "B"
  11. Range("A3").Select
  12. ActiveCell.FormulaR1C1 = "C"
  13.  
  14. 'select "source" values and copy
  15. Range("A1:A3").Select
  16. Selection.Copy
  17.  
  18. 'move to "destination"
  19. Range("B1").Select
  20.  
  21. 'paste the "picture link"
  22. ActiveSheet.Pictures.Paste(Link:=True).Select
  23. Application.CutCopyMode = False
  24.  
  25. 'check out results
  26. Stop
  27.  
  28. 'change values
  29. Range("A2").Select
  30. ActiveCell.FormulaR1C1 = "99"
  31.  
  32. 'notice "destination" changed
  33. Stop
  34.  
  35. 'change formatting
  36. Range("A3").Select
  37. Selection.Font.Size = 20
  38.  
  39. 'notice formatting changed
  40. Stop
  41.  
  42. End Sub
  43.  
  44. SheetName!Cell
  45.  
  46. =Sheet2!B4
Add Comment
Please, Sign In to add comment