set label text of controlformat

S

ShaneDevenshire

Hi,

You might try this or some variation of it

ActiveSheet.Shapes("Label1").Select
Selection.Characters.Text = "abcd"
Range("F10").Select
 
M

Mauro Gamberini

Private Sub m()
Dim lbl As Shape
With Me
Set lbl = .Shapes("Label 8")
lbl.Select
Selection.Characters.Text = "Pippo"
Set lbl = Nothing
End With
End Sub
 
P

Peter T

I'm guessing Label1 is a Label from the Controls toolbox menu, an ActiveX
control. If so try this -

Dim ole As OLEObject
Set ole = ActiveSheet.OLEObjects("Label1")
ole.Object.Caption = "hello"

Regards,
Peter T
 
P

Peter T

Describe what you mean by "label control of controlformat"

If the object is on a sheet, which toolbar did you use to create it.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top