Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default linkedcell property

Hello,

I've a label on a ws named "lblMsg". I am trying to link its caption to
the value of a cell returned from a macro.

I've tried to place the following code in the macro itself:
sheets("shname").lblMsg.caption = "my message"
the statement is executed w/o errors, but the label caption is not
displayed.

I,ve also tried to set the linkedcell property from the ws activate
event. VBA shows this property and accepts it, but I get an error.

Any tip?

Thanks and best wishes to all.
Emiliano


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default linkedcell property

I am correct in reading your message to mean:
1) on the worksheet with the name "shname" you have a cell which has been
named lblMsg
2) you want to give this cell the value "my message"
If this is correct, please try:
Sheets("shname").Range("lblMsg").Value = "my message"
Note that Value can be omitted
Sheets("shame").Range("lblMsg") = "my message"

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Emiliano" wrote in message
.. .
Hello,

I've a label on a ws named "lblMsg". I am trying to link its caption to
the value of a cell returned from a macro.

I've tried to place the following code in the macro itself:
sheets("shname").lblMsg.caption = "my message"
the statement is executed w/o errors, but the label caption is not
displayed.

I,ve also tried to set the linkedcell property from the ws activate event.
VBA shows this property and accepts it, but I get an error.

Any tip?

Thanks and best wishes to all.
Emiliano




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default linkedcell property

No, I hav'nt a cell but a Label Control named lblMsg.
I have, however, solved the problem using a textbox control.
I think a label caption can't be linked to a cell value like
the textbox control can.

Thanks anyway,
Emiliano


Bernard Liengme a écrit :
I am correct in reading your message to mean:
1) on the worksheet with the name "shname" you have a cell which has been
named lblMsg
2) you want to give this cell the value "my message"
If this is correct, please try:
Sheets("shname").Range("lblMsg").Value = "my message"
Note that Value can be omitted
Sheets("shame").Range("lblMsg") = "my message"

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Emiliano" wrote in message
.. .
Hello,

I've a label on a ws named "lblMsg". I am trying to link its caption to the
value of a cell returned from a macro.

I've tried to place the following code in the macro itself:
sheets("shname").lblMsg.caption = "my message"
the statement is executed w/o errors, but the label caption is not
displayed.

I,ve also tried to set the linkedcell property from the ws activate event.
VBA shows this property and accepts it, but I get an error.

Any tip?

Thanks and best wishes to all.
Emiliano




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
Change LinkedCell with VBA Wingman[_2_] Excel Programming 0 November 27th 07 02:00 PM
LinkedCell problem TFriis Excel Programming 4 November 27th 07 12:30 PM
setting LinkedCell using VBA michael.beckinsale Excel Programming 2 September 1st 06 04:20 PM
Export Linkedcell racerman Excel Programming 2 September 5th 05 08:39 PM
Linkedcell Problems... cornishbloke[_25_] Excel Programming 3 January 21st 04 02:45 PM


All times are GMT +1. The time now is 12:53 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"