Thanks again guys. For developing programs I am running R3.043.022 (the latest version?) on my laptop using Windows XP, my lathe has R.042.029 running on Windows 7 but behaviour is essentially the same.
After trying things over again it does seem that as BR549 says, the Sleep() part is critical:
LoadFile() - Runfile() does not work
Loadfile() - While IsLoading() - Wend - Runfile() does not work either
LoadFile() - Sleep(1000) - Runfile() does work
Loadfile() - While IsLoading() - Sleep(1000) - Wend - Runfile() also works but no better than the previous set of instructions
I thought that I had tried last two approaches prevously but without success - maybe something else was wrong.
I have checked different sleep times and Sleep(300) (300ms?) is the minimum to load the few lines in my test program.
Anyway, with your help my problem appears to be solved, although the sleep time will presumably have to be extended for longer programs. Unfortunately it also appears that the manual does not give the whole story on what is required for loading and running files.
J