Skip to content

Instantly share code, notes, and snippets.

@eggist77
Last active July 18, 2021 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggist77/8f6b3e67d16a68055bb456f691f36070 to your computer and use it in GitHub Desktop.
Save eggist77/8f6b3e67d16a68055bb456f691f36070 to your computer and use it in GitHub Desktop.
vba: Insert an arrow in the selection hatena: entry/20181121/1542802915
' @description Insert an arrow in the selection hatena: entry/20181121/1542802915
' @auther n.
' @version 1.0
' @since 2018.11.21
' @update 2018.11.21
Sub makeArrow()
Dim r As Range
Set r = Selection
With ActiveSheet.Shapes.AddLine(r.Left, r.Top + r.Height / 2, r.Left + r.Width, r.Top + r.Height / 2).Line
.ForeColor.RGB = RGB(0, 0, 255)
.Style = 1
.BeginArrowheadStyle = 3
.EndArrowheadStyle = 3
.Weight = 3
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment