title: Why is VBA saying that it has found an 'ambiguous name'?
body: <p>When compiling some code (declarations shown below) I get the error message 'Compile Error: Ambiguous name detected. SixTables'.  I have looked here and elsewhere but cannot find anything that matches my problem.  What appear to be the most common causes of this error, declaring two variables with identical names or giving the same name to a function and the sub that it is called from, do not apply.  And yes, I know I could just change the name to something the system was happy with, but (1) I wouldn't learn what I'm doing wrong, and (2) I chose that name for a reason - it fits its purpose exactly :-)</p>
  
  <pre><code>Option Explicit
  
  Dim ArmOfService As Byte
  Dim CharacterNumber As Long
  Dim CurrentTerm As Byte
  Dim DecorationRollMade As Byte
  Dim DecorationRollNeeded As Byte
  Dim DiceSize As Byte
  Dim GenAssignment
  Dim GenAssignmentSwitchInt As Byte
  Dim GenAssignmentSwitchOff As Byte
  Dim iLoopControl
  Dim jLoopControl
  Dim kLoopControl
  Dim LineIncrement As Integer
  Dim lLoopControl
  Dim Merc(100)
  Dim NoOfDice As Byte
  Dim OfficerPromotion(63 To 78) As Byte
  Dim PromotionRollMade As Byte
  Dim PromotionRollNeeded As Byte
  Dim Roll As Byte
  Dim SkillColumn
  Dim SixTables
  Dim SpecAssignmentSwitchEnd As Byte
  Dim SurvivalRollMade As Byte
  Dim SurvivalRollNeeded As Byte
  Dim TechLevel As Byte
  Dim Temp As Integer
  Dim Term As Byte
  Dim TestCount
  Dim UnitAssignment
  Dim WhichTable
  Dim Year As Byte
  </code></pre>
  
  <p>EDIT: I'm so embarrassed that I can hardly bring myself to explain what the problem was.  I knew I hadn't duplicated a name, since I was only using it once - as a function!  Thanks all for your help, I'm now going to go and hide my face in shame...</p>