0
我不能修复此代码,让Else
错误,而不If
:否则,如果在命令部分
Sub aRefreshData()
If Worksheets("Control tab").Range("$I$2").Value = "OFF" Then MsgBox "Enable Connection before refresh"
Else
ActiveWorkbook.Connections("server DB").Refresh
End If
End Sub
欢迎后,#2。你需要添加一个语言标签(这看起来像VBA),[格式化你的代码](http://stackoverflow.com/help/formatting),并扩大你的问题的解释 – JGreenwell