Ciao a tutti, ho un problema ad usare il metodo VBproject.
Devo esportare un modulo però mi va in errore:
"L'accesso a livello di programmazione al progetto visual basic non è attendibile".
Qualcuno sa qualcosa in merito?
Set wkbSrc = Workbooks.Open(sPath3, False)
With wkbSrc.VBProject
For i = 1 To .VBComponents.Count
' controlla che il componente e` un modulo
If .VBComponents(i).Type = 1 Then
sPath2 = sPath & "\" & .VBComponents(i).Name & ".bas"
' esporta il modulo
.VBComponents(i).Export sPath2
' lo importa nel file attivo
wkbDest.VBProject.VBComponents.Import sPath2
End If
Next i
End With