You can't create a new instance of the Mach object. Mach must be running then attach to it with...
Dim mach As Mach4.IMach4
mach = GetObject(, "Mach4.Document")
Dim scriptObject As Mach4.IMyScriptObject
scriptObject = mach.GetScriptDispatch()
scriptObject.LoadFile("d:\Mach3\GCode\roadrunner.tap")
I added a reference to Mach4 and used the public procedure LoadGCodeFile and it compiles but seems to go to the DLL and dies.
Not sure about the Imports or the Dim statement
Using Imports is optional. It means you don't have to type the full class path. In this case the Mach4. namespace.