RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums

How do I pass data in string from a form to another?

Join Date: Mar 2007
Posts: 5
Reputation: JamesDT is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
JamesDT JamesDT is offline Offline
Newbie Poster

Re: How do I pass data in string from a form to another?

  #2  
Mar 21st, 2007
There are many ways,
You could have a global variable in your second form to store which option was selected. Then just have a PUBLIC method in your second form called getSelected which returns your option
public function getSelected()
return selection
end function


then as long as you open the second form modally, the first form will wait for the second form to close before executing the rest of the code.

form2.show vbModal
option = form2.getSelected()
form2.dispose()


or for VB2005

form2.showDialog()
option = form2.getSelected()
form2.dispose()

will open it in Modal

Hope this helps
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:50 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC