Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default set label text of controlformat

dim lbl as controlformat.label
set lbl=activesheet.shapes("Label1")
lbl.text="abcd"

this code do not work..
How can I do work?



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default set label text of controlformat

Hi,

You might try this or some variation of it

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

--
Thanks,
Shane Devenshire


"hoho sklo" wrote:

dim lbl as controlformat.label
set lbl=activesheet.shapes("Label1")
lbl.text="abcd"

this code do not work..
How can I do work?



*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default set label text of controlformat

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

--
---------------------------
Mauro Gamberini
http://www.riolab.org/
"hoho sklo" ha scritto nel messaggio
...
dim lbl as controlformat.label
set lbl=activesheet.shapes("Label1")
lbl.text="abcd"

this code do not work..
How can I do work?



*** Sent via Developersdex http://www.developersdex.com ***



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default set label text of controlformat



thanks, but i want to do not use the select method.
namely,,,

lbl.value="dddddddd"

but this code not work.

*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default set label text of controlformat

thanks, but i want to do not use the select method.
namely,,,

lbl.value="dddddddd"

but this code not work.


...then don't use Forms Label, but
Control ToolBox Label.

--
---------------------------
Mauro Gamberini
http://www.riolab.org/




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default set label text of controlformat

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

"hoho sklo" wrote in message
...
dim lbl as controlformat.label
set lbl=activesheet.shapes("Label1")
lbl.text="abcd"

this code do not work..
How can I do work?



*** Sent via Developersdex http://www.developersdex.com ***



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default set label text of controlformat



thanks, but, i want to do label control of controlformat..
oleobject is not...

*** Sent via Developersdex http://www.developersdex.com ***
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default set label text of controlformat

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

"hoho sklo" wrote in message
...


thanks, but, i want to do label control of controlformat..
oleobject is not...

*** Sent via Developersdex http://www.developersdex.com ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
controlformat.enabled failed in excel macro DAACKM Excel Programming 1 September 15th 08 05:32 PM
ControlFormat Problem equiangular Excel Programming 2 February 28th 07 06:20 AM
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False Joe HM Excel Programming 0 August 3rd 06 07:46 PM
Shape ControlFormat.LinkedCell returns wrong Address for named range - BUG [email protected] Excel Programming 10 July 14th 06 03:05 PM
add text to label (label from forms toolbar) Rob Bovey Excel Programming 0 September 5th 03 09:46 PM


All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"