Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a userform for input within a subroutine 1

Status
Not open for further replies.

rlman

Technical User
Aug 23, 2003
4
US
I have a subroutine, in it I call a form. I wish to get some of the input values that were placed in the text boxes.
I have a button which when clicked stores the values in public variables. When I click the button, the form does not give control back to the calling subroutine. Is there any setting that I can get by the form and still execute my orginal (calling) subroutine.

Thanks for any help.
 
The form will have control for as long as it is open. Can you just have the button's code close the form after it populates the global variables? That will give control back to your subroutine.

VBAjedi [swords]
bucky.gif
 
Thanks for the reply. I was hoping to leave the form open. At least I know there is no way to leave it open and bypass the form. I will close the form and see how that works.



 
The latest versions of Office have "Modeless Forms", which can supposedly be left open without having the focus. Haven't used them myself (still using Office97), but I've heard they have pros and cons.

Might be worth reading up on, though!

VBAjedi [swords]
bucky.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top