Hello all,
I am slowly learning how to use VBA but I could use some help with my current project. I need a VBA code to insert a text box next to the active cell. I found the code below online but I am not sure how to edit the text box size and border color. Any assistance is greatly appreciated.
I am slowly learning how to use VBA but I could use some help with my current project. I need a VBA code to insert a text box next to the active cell. I found the code below online but I am not sure how to edit the text box size and border color. Any assistance is greatly appreciated.
Code:
Option Explicit
Sub PrP_WKP()
Dim mycell As Range
Dim myTextBox As TextBox
Set mycell = ActiveCell
With mycell
Set myTextBox = .Parent.TextBoxes.Add(Top:=.Top, Left:=.Left, _
Width:=.Width, Height:=.Height)
With myTextBox
.Caption = "A" 'if you want...
End With
End With
End Sub
Last edited: