Run-time error '1004' : Method 'Range' of object'_Global' failed; SIMPLE COPY AND PASTE

后端 未结 1 674
暗喜
暗喜 2021-01-26 17:37

I\'m just trying to do a simple cut and paste to shift ranges in F:G to an unoccupied cell in D but I keep getting that error message. My codes are in the Modules a

相关标签:
1条回答
  • 2021-01-26 18:09
    Range(“F” & RowNum & ":G" & RowNum).Select
          ^ ^            ^  ^
          | |            |  |
        Chr(147)        Chr(34)
    

    The 'quotation marks' around F are character 147. To denote a string value you have to use character 34, like the ones around :G

    This usually happens when copy/pasting code from a website. Delete the quotation marks and re-write them manually to solve the issue.

    0 讨论(0)
提交回复
热议问题