How do I declare a global variable in VBA?

前端 未结 8 1221

I wrote the following code:

Function find_results_idle()

    Public iRaw As Integer
    Public iColumn As Integer
    iRaw = 1
    iColumn = 1
8条回答
  •  天命终不由人
    2020-11-22 09:10

    To use global variables, Insert New Module from VBA Project UI and declare variables using Global

    Global iRaw As Integer
    Global iColumn As Integer
    

提交回复
热议问题