Hi there
I'm porting over some automate 9 tasks to automate 11 and have run into a roadblock.

in automate 9 
i could pass a dataset to a BASIC function - see example below
but now it comes back as an invalid type error in automate 11

nRows = Eval(dsName & ".TotalRows")  is the line it fails on.  This function works perfectly fine in automate 9

From automate 11 the steps are:

%DatasetToHTMLTable ("ds")%


Any advice?

thanks
Eric




Public Function DatasetToHTMLTable (dsName)
    ' dsName is the name of the dataset as a String (don't forget to enclose it in quotes)   
   
    Dim html,nRows,nCols,i,j,css,colName

    nRows = Eval(dsName & ".TotalRows")
    nCols = Eval(dsName & ".TotalColumns")
   
    css =  ""  & vbCrLf

    html = css & "" & vbCrLf
     
    For j = 1 To nRows
        html = html & ""
        For i = 1 To nCols
            colName = "Column" & i
            html = html & ""
        Next
        html = html & "" & vbCrLf
    Next

    html = html & "
" & Eval (dsName & "(j)." & colName ) & "
" DatasetToHTMLTable = html End Function