View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
VB_Help VB_Help is offline
external usenet poster
 
Posts: 1
Default .TextFrame.Characters.Text property readOnly in function??

I am trying to mirror the text in an Excell cell to the text
in a shape object using the code below.

Cell B3: = 5/5/03
Cell B4: = =SomeWB.XLS!tmp(B3)

Function tmp(dte As Range) As String
// thisShape shape object already exists
With ActiveSheet.Shapes("thisShape")
.TextFrame.Characters.Text = dte.Value
End With
tmp = "OK"
End Function


// sub is run using Marco | Run
Sub tmp() // thisShape shape object already exists
With ActiveSheet.Shapes("thisShape")
.TextFrame.Characters.Text = "mock date value"
End With
End Function


I use the same code in a Sub and a Function, but the dte.Value won't
display using the function. I even called the sub from a function an it
still does not work.