I am embedding some VB in a Scripted Object within a MathCad worksheet. I am trying to get the Worksheet object so I can get/manipulate some values in the sheet, but when I call ActiveWorksheet (or Worksheets for that matter) on the Application object, nothing is returned.
I am inexperienced with VB so forgive anything weird I am doing, but feel free to point it out. Here is what I have basically. I get an error object worksheet is required on the last line of the Sub.
Sub getValueEvent_Exec(Inputs,Outputs)
Dim objMC
Dim value
Dim worksheet
Set objMC = CreateObject("MathCad.Application")
Set worksheet =objMC.ActiveWorksheet
Set value = worksheet.getValue("value")
End Sub
Thanks,
Evan