Innanzitutto grazie per la risposta. Volevo solo precisarti una cosa:
Dicendo
"...utilizzare come variabile membro della classe un componente OCX..."
intendo dire questo:
codice:
Option Explicit
' PROPRIETA': Variabili membro private
Private m_comm As MSComm
Private m_num As Long
Private m_str As String
' METODI: Funzioni di interfaccia
Public Sub funzione1()
m_str = "Stringa1"
m_num = 1
End Sub
Public Sub funzione2(ByVal var As String)
m_str = "Stringa2"
m_num = 2
m_comm.CommPort = 1 <-------!!!! ERRORE!!!!!
End Sub
L'errore e' "Object variable or With block variable not set (Error 91)"
Perche' non posso assegnargli il valore?????