Why 'Row' changes to 'row' in Excel VBA

前端 未结 3 465
一个人的身影
一个人的身影 2020-12-07 04:12

For unknow reason my Excel VBA editor changes:
Cells(ActiveCell.Row, 1).Value = MyString
into
Cells(ActiveCell.row, 1).Value = MyString

3条回答
  •  执念已碎
    2020-12-07 05:06

    I was also getting a bit tired of from looking where exactly I have declared a Row with a small letter, as far as it was not declared anywhere.

    Thus, found a great solution - add the following in a module:

    Public Sub TestMe
       Dim Row as Long
    End Sub
    

    And see the whole code changing. Then you may delete it. Or simply write Dim Row as Long on a new line, somewhere in your code. And then delete it.

提交回复
热议问题