请教为什么withevents不调用?
请教:dll名为RFPComm32,在Form1中执行command1时,无法获得force值,请求帮助!
Dim rf As RFPComm32.RFPCommDim WithEvents rf1 As RFPCommPrivate Sub Command1_Click() rf1.PortNo = 1 rf1.Baud = 9600 rf1.Active = TrueEnd SubPrivate Sub rf1_OnAddItem(ByVal Force As Single, ByVal Disp As Single, ByVal Ext As Single) Text1 = ForceEnd Sub
Private Sub Command1_Click() rf1.PortNo = 1 rf1.Baud = 9600 rf1.Active = True Debug.Print TypeName(rf1)End Sub
[解决办法]
没有创建对象
new一个再说