DO 11 Script - Help with SetSourceTab

My objective is to create a command object and set its SOURCE tab to be the original DEST tab, assuming there is a DEST tab. The following code breaks at the NewCmd.setsourcetab = fd.func.desttab statement as shown in the trace. What am I doing wrong?

[code]Function Main(ByRef fd)

DOpus.output "Source: " & fd.func.command.source
DOpus.output "Target: " & fd.func.command.dest

Dim NewCmd
Set NewCmd = DOpus.createcommand

DOpus.output "NewCmd Source: " & newcmd.source
If Not fd.func.command.dest = "" then NewCmd.setsourcetab = fd.func.desttab

End Function[/code]

Regards, AB

SetSourceTab is a method, not a property, so you need to take out the equals sign.


Smart boy wanted! Always so obvious in hindsight. Thanks Jon.

Regards, AB