• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Asking questions in VB

usr7501

New Member
I am novice to this, I am curious if there is a better way to acquire information in Excel/VB?

The first procedure is not a problem. Do I have to pass on the parameter to the next proceure in some way or the main procedure or will it understand on its own?

Code:
Sub InputBox1()

x = InputBox("How many do you want to process?")

End Sub



Sub Getanswer()

Config = vbYesNo + vbQuestion + vbDefaultButton2

Ans = MsgBox(”Do you want to continue?”, Config)

If Ans = vbYes Then RunNextSub

If Ans = vbNo Then Exit Sub

End Sub
 
Last edited by a moderator:
By default each Sub is separate and has no knowledge of the other subs
You can get around this by either passing data to them or declaring variabvles as global variables

You may want to have a read of this question and the responses
https://chandoo.org/forum/threads/declare-integer-values-globally.36727/#post-220437

Then come back with any further questions

Generally I wouldn't do what you are doing in separate subs
They would all be in one sub

If you want to share your project we can give you a more specific guide for advancing
 
Back
Top