编译某些代码(如下所示的声明)时,我收到错误消息“编译错误:检测到名称不明确”。六桌'。我在这里和其他地方看过,但找不到任何符合我的问题的东西。似乎是此错误的最常见原因,即声明具有相同名称的两个变量或为函数和调用它的子程序提供相同名称的情况并不适用。是的,我知道我可以将名称更改为系统满意的名称,但是 (1) 我不会知道我做错了什么,并且 (2) 我选择这个名称是有原因的 - 它适合它目的正是:-)
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 …Run Code Online (Sandbox Code Playgroud)