Ciao,

per chiudere un oggetto uso solo solo con

nomeogg = Nothing

o ci vuole anche

nomeogg.close