473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

help me with my program.

i am attempting to make a video game. I need to know how to declare a global variable. could someone post code that will let me make a global variable.

thanks...
Feb 11 '07 #1
5 865
To declare a global variable you must add a module(Goto Project Menu->Add Module) to your project first and declare variable in it like this
Expand|Select|Wrap|Line Numbers
  1. Public gIntLevel As Integer
  2. Public gstrPlayerName As String
Feb 11 '07 #2
which is the variable? cause i need to make about 15 of them. how do i call them out in my program.
Feb 11 '07 #3
i just need to find out how to call them out in my program
Feb 11 '07 #4
balid
18
i just need to find out how to call them out in my program
Just use the variable name in the line of code.
IE:
Expand|Select|Wrap|Line Numbers
  1. public variable1 as string
  2. public variable2 as string
  3.  
  4. ... your code ...
  5. variable1 = "hello"
  6. variable2 = variable1 + "there"
  7.  
  8. ...
  9.  
  10. if variable1 = "hello" then
  11. end if
  12.  
Something like that.
Feb 12 '07 #5
ok thank you
Feb 13 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
5
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my...
7
by: tyler_durden | last post by:
thanks a lot for all your help..I'm really appreciated... with all the help I've been getting in forums I've been able to continue my program and it's almost done, but I'm having a big problem that...
2
by: Bsnpr8 | last post by:
I need help guys, i have to many stuff to do, because i am in my last 2 weeks of the university, my last assignment is to do a spell checker in C++, i have an idea but nothing is coming out. I really...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.