Excel vba里,怎么设置全局变量,放在哪?
Dimsh2AsWorksheetDimrr2AsLongDimwbAsStringDimnameSetsh2=ThisWorkbook.Sheets(2)rr2=sh2...
Dim sh2 As Worksheet
Dim rr2 As Long
Dim wb As String
Dim name
Set sh2 = ThisWorkbook.Sheets(2)
rr2 = sh2.Range("A1000000").End(xlUp).Row
就是这些变量,怎么设置成全局变量,不用每个sub都输入,
设置好了,把这些粘贴在哪,每个sub才能都找到? 展开
Dim rr2 As Long
Dim wb As String
Dim name
Set sh2 = ThisWorkbook.Sheets(2)
rr2 = sh2.Range("A1000000").End(xlUp).Row
就是这些变量,怎么设置成全局变量,不用每个sub都输入,
设置好了,把这些粘贴在哪,每个sub才能都找到? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |