mercredi 14 septembre 2016

else if error on Command part

I can't fix this code that gives Else without 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

thanks

Aucun commentaire:

Enregistrer un commentaire