請教type mismatch的錯誤
大家看看為什么運行到OA.SETCONN(CNN)的地方報type mismatch的錯誤呀﹗
VB
Dim CyOA As New OA.FreeForm
Dim Cnn As New ADODB.Connection
Cnn.ConnectionString = "provider=sqloledb;server=;database=;uid=sa;pwd="
Cnn.Open
OA.SetConn (Cnn)
------------------------------------------
dll 文件如下
Option Explicit
Public conn As ADODB.Connection
Function SetConn(Cnn As ADODB.Connection)
Set conn = Cnn
End Function