Hi
I don't use VB, except where I have to for Mach.
Looking at the reference material, ( always a good move ) the below is a starting basis
Dim currentfile As String
currentfile = "" // ensure string is empty before you start
currentfile = FileName()
If Len(currentfile) Then
// Do whatever you want to if you find a .NC file is already loaded here
End If
I have put together all the references I found on VBS when I was writing macros
HERE for download.
When you have read them you will know as little as me.
regards
Melee