K
korrin.anderson
Good afternoon!
I have a macro which creates text boxes in excel, based on values in a
hidden worksheet. One of thos values is a location within the
workbook, ie "Sheet1!A2". When creating the textbox in vba, I would
like the text box (or the text within the box) to be linked to that
cell. I have looked everywhere and cannot find anything on how to do
this.
Here is the code which creates the textbox:
dim dealtextbox as shape
Set DealTextbox =
Sheets(1).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal,
_
Left:=350, Top:=lengthPrevBox + 10, Width:=600, Height:=10)
With DealTextbox
.TextFrame.AutoSize = True
If .Width > 300 Then
y = .Width * .Height
.Width = 300
.Height = (y / 200)
End If
.TextFrame.Characters(1, 11).Font.Bold = True
end with
I have a macro which creates text boxes in excel, based on values in a
hidden worksheet. One of thos values is a location within the
workbook, ie "Sheet1!A2". When creating the textbox in vba, I would
like the text box (or the text within the box) to be linked to that
cell. I have looked everywhere and cannot find anything on how to do
this.
Here is the code which creates the textbox:
dim dealtextbox as shape
Set DealTextbox =
Sheets(1).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal,
_
Left:=350, Top:=lengthPrevBox + 10, Width:=600, Height:=10)
With DealTextbox
.TextFrame.AutoSize = True
If .Width > 300 Then
y = .Width * .Height
.Width = 300
.Height = (y / 200)
End If
.TextFrame.Characters(1, 11).Font.Bold = True
end with