When you Run a Function Panel in interactive execution, it runs the function separately in the interactive execution mode. It does NOT run your entire program. Therefore, in your case, you are running SetCtrlVal and you have not called LoadPanel or DisplayPanel, therefore the SetCtrlVal is telling you the panel handle is not valid since it hasn't been loaded yet.
Interactive Execution is not really very beneficial with user interface function since you want to test those after the UI is loaded and displayed. The purpose of interactive execution is to run a single function or small set of function separately to see how it works alone before inserting it in your program. This is useful for function like analysis functions, string parsing, etc.
Best Rega
rds,
Chris Matthews
National Instruments