Variables Not Allowed But Reason Doesnt Make Sense

Posted on 2005-03-04
Medium Priority
Last Modified: 2013-12-26
I have a monopoly game in visual basics and it has two forms at this time. The was complete however I'm going to make big changes to it.

I started by saving the two forms to a new folder under different names and deleting all the code. However when I try to create integers dice1 and dice2 I get a response telling me that the integer allready exists in object module from which this module derives.

Now there aint no modules on this project so what does it mean? I can change the variables to avoid it but that means its controlling me and I dont like it.

What do I do to sort this?
Question by:Ryan Bayne
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

List244 earned 1000 total points
ID: 13464496
"Member already exists in a object module from which this module derives"

That means that you have an OBJECT named Dice1, or Dice2, or both.
You probably named your dice (which roll) the same as your integers.
This causes a problem with the code, because it would confuse the two.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question