fork download
  1. Option Explicit
  2.  
  3. Sub ガントチャート描画()
  4. Dim c As Range
  5. Dim org As Range
  6. Dim dst As Range
  7.  
  8. For Each c In Range("D8:D20")
  9. If c.Value <> "" Then
  10. Set org = Range("F5:AJ5").Find( _
  11. What:=c.Value, LookAt:=xlWhole)
  12. Set dst = Range("F5:AJ5").Find( _
  13. What:=c.Offset(0, 1).Value, LookAt:=xlWhole)
  14.  
  15.  
  16. With ActiveSheet.Shapes.AddLine(org.Left + 0, _
  17. c.Top + 7, dst.Left + 0, c.Top + 7).Line
  18. .EndArrowheadStyle = msoArrowheadTriangle
  19. .ForeColor.RGB = RGB(0, 0, 128)
  20. .Weight = 3
  21. End With
  22. End If
  23. Next
  24. End Sub
  25.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty