Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change LinkedCell with VBA | Excel Programming | |||
LinkedCell problem | Excel Programming | |||
setting LinkedCell using VBA | Excel Programming | |||
Export Linkedcell | Excel Programming | |||
Linkedcell Problems... | Excel Programming |