V
VB_Help
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.
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.