S simonlee11 Member Licensed User Longtime User Mar 11, 2011 #1 Hi, How do i call a subroutine when a button is pressed thanks
klaus Expert Licensed User Longtime User Mar 11, 2011 #2 You must be more precise on what you want to do. What kind of sub do you want to call ? The event sub of the button or another sub ? Best regards. Upvote 0
You must be more precise on what you want to do. What kind of sub do you want to call ? The event sub of the button or another sub ? Best regards.
S simonlee11 Member Licensed User Longtime User Mar 11, 2011 #3 I want to call a sub depending on an if statement result not the actual button sub Upvote 0
K kickaha Well-Known Member Licensed User Longtime User Mar 11, 2011 #4 If the sub is in the same activity module just call it by name Code: 'code If thing then MySub ' this calls MySub 'code Sub MySub 'Do stuff End Sub Upvote 0
If the sub is in the same activity module just call it by name Code: 'code If thing then MySub ' this calls MySub 'code Sub MySub 'Do stuff End Sub
S simonlee11 Member Licensed User Longtime User Mar 11, 2011 #5 thankyou at last a simple response to a simple question. I love this program but we need some documentation for those of us who are just starting out. Thanks :sign0104: Upvote 0
thankyou at last a simple response to a simple question. I love this program but we need some documentation for those of us who are just starting out. Thanks :sign0104:
K kickaha Well-Known Member Licensed User Longtime User Mar 11, 2011 #6 @'Tis often said that I am simple :sign0161: Upvote 0
S simonlee11 Member Licensed User Longtime User Mar 11, 2011 #7 thanks again, I have written this in visual basic and it works but re writing it using basic4android is hard work. Thanks again Upvote 0
thanks again, I have written this in visual basic and it works but re writing it using basic4android is hard work. Thanks again
D dlfallen Active Member Licensed User Longtime User Mar 11, 2011 #8 Welcome to the B4A community! A few comments - intended to help, please do not take offense: at last a simple response to a simple question Click to expand... At last? You got an answer less than 3 hours after your original post. It would have been less than an hour if your original question had been specific. Because your question was nonspecific, potential responders had three choices: (1) contrive an comprehensive answer that would handle all possibilities (time consuming), (2) Guess at what you really needed and risk wasting the time of you, the responder, and anyone who peeked at this thread, or (3) ask for clarification so a clear and consise answer could be provided to you. Klaus was quite correct in asking for clarification. For future questions, providing as much actual code as possible would be a lot of help in responding to your questions. Take a look at the frequency and quality of help Klaus has provided to many folks. He deserves respect, not derision. There is a great deal of documentation on this forum. Specifically, there is a VB6 to B4A conversion table that would undoubtedly be of great value to you in converting your Visual Basic code. You can find in this thread (not obvious from the title): http://www.b4x.com/forum/basic4andr...ls/7475-there-goto-line-label-equivalent.html There are many of us who have converted VB code to B4A. An easy way to ask a question would be to say "this is how I did it in VB (code . . .), how do I do it in B4A. You would probably get a quick, spot on answer. Good luck, and have fun! Upvote 0
Welcome to the B4A community! A few comments - intended to help, please do not take offense: at last a simple response to a simple question Click to expand... At last? You got an answer less than 3 hours after your original post. It would have been less than an hour if your original question had been specific. Because your question was nonspecific, potential responders had three choices: (1) contrive an comprehensive answer that would handle all possibilities (time consuming), (2) Guess at what you really needed and risk wasting the time of you, the responder, and anyone who peeked at this thread, or (3) ask for clarification so a clear and consise answer could be provided to you. Klaus was quite correct in asking for clarification. For future questions, providing as much actual code as possible would be a lot of help in responding to your questions. Take a look at the frequency and quality of help Klaus has provided to many folks. He deserves respect, not derision. There is a great deal of documentation on this forum. Specifically, there is a VB6 to B4A conversion table that would undoubtedly be of great value to you in converting your Visual Basic code. You can find in this thread (not obvious from the title): http://www.b4x.com/forum/basic4andr...ls/7475-there-goto-line-label-equivalent.html There are many of us who have converted VB code to B4A. An easy way to ask a question would be to say "this is how I did it in VB (code . . .), how do I do it in B4A. You would probably get a quick, spot on answer. Good luck, and have fun!
S simonlee11 Member Licensed User Longtime User Mar 12, 2011 #9 sorry guys, i didnt mean to offend the forum and its members I appreciate the responses i had spent a long time searching for an answer before i posted the question thats all. Thanks Upvote 0
sorry guys, i didnt mean to offend the forum and its members I appreciate the responses i had spent a long time searching for an answer before i posted the question thats all. Thanks