Using forms?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

Using Excel 2003 here. I've created a form but have a couple questions on
how to implement them. I made a subroutine that calls the form with a show
statement. What I'd like to see happen is when the user clicks a botton on
the form it runs another routine to perform some actions. I have this other
routine working now but I noticed that by default it is public. My concern
with this is that someone may just go to Tools | Macros and run the routine
without running the form. I use the form to force the user into setting a
number of variables needed for the routine. It also seems as though the
called routine doesn't complete until the form is closed. It's performing a
remote query of a SQL server.

My questions are then:
1.) How can I get the remote query to complete without releasing the form?

2.) How can I return a value from the form to the calling program? I'd like
to make the second subroutine private but if I do I can't run it from the
form itself. So I'd like to return a value to the calling subroutine and
continue exicution from there.

Hope this makes sense and thanks in advance for your help.
Linn


.



Relevant Pages

  • Re: Fast pancake flipping
    ... excerpt of my fast flipper here. ... Recently I wrote a subroutine that seemed to qualify for the ... It is certainly true that making a routine readable is usually ...
    (comp.programming)
  • Re: Learning Fortran
    ... The main code has several subroutine calls and by my quick flowchart-check the calls go five deep at a max. ... the implementation *and* the algorithm. ... Somebody who knows a little about the filter design procedure ... called when a low-pass spec is issued to the routine.) ...
    (comp.soft-sys.matlab)
  • Re: What routine is running
    ... argumnent a dynamic array and, with the addition of 1 line of code in the ... sub, gurarantee the existing code will work. ... duplicating an entire routine is a terrible solution. ... if the subroutine is meant to modify the value ...
    (comp.databases.pick)
  • Re: Are these the same arguments?
    ... to do those optimizations. ... routine is using it as an array, ... routine is using the argument as an array. ... subroutine sub1([other args], x) ...
    (comp.lang.fortran)
  • Re: using optional arguments not present (bug)
    ... an attribute for an optional dummy argument that makes the dummy ... end subroutine sub ... actual argument to sub2 is always present; it doesn't get a non-present ... E.g. nearly all my procedures have an optional argument "message_log" which is passed to a message display routine. ...
    (comp.lang.fortran)