change

Dim cnConnect As Connection


to

Public cnConnect As Connection