Normal Topic Press a command button from Programming? (Read 1299 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Press a command button from Programming?
Dec 5th, 2004 at 6:54pm
Print Post Print Post  
Is there a way to have SBasic launch the program in a command button without having to launch a Macro to do it?

I've found myself copying the same program (From a Calculation button) into several different programs on the same form. Then if I make one change to the calculation button, I have to change it several times in each program.

I have not gotten into Macro's yet, but I'm ready to if that's my only choice.

Thanks!
Steve
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Press a command button from Programming?
Reply #1 - Dec 5th, 2004 at 7:13pm
Print Post Print Post  
Put the code in a subroutine or function. Then everything can call the same routine and you only need to change it in one place.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Press a command button from Programming?
Reply #2 - Dec 5th, 2004 at 7:17pm
Print Post Print Post  
Thanks Erika!  Smiley

Steve
  
Back to top
IP Logged