English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have created a game using VB and and i would like to noe how to use a result...example, geting a score in a maths game and so it can be shown on a certificates page in a different form?

2007-09-09 20:06:05 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

Hi,
Insert a module in ur project. If a module is already there then in top of ur module (i.e., in declare section) u declare a variable "Dim Result as Variant" or of any type. This variable will be a Global variable. It can be accessed from anywhere in ur project.

2007-09-09 20:56:37 · answer #1 · answered by iqbal 4 · 0 0

You can either refer to that other form directly in your code, such as:

OtherFormName.Value = MyValue

OR you can set up a Global Variable in a MODULE (not one of your forms) which can then by accessed by both of the forms. Just make a new blank module. Declare your variable in it, and you're all set.

Global MyValue as String


For more help on VB, see: http://www.599cd.com/site/courselist/vb/vb101?key=YA


Richard

2007-09-10 03:56:50 · answer #2 · answered by Richard Rost 1 · 0 0

fedest.com, questions and answers