Greetings,
I have a spreadsheet linked to a SharePointe list. I created a marco that is attached to a command button so that when it is activated it will refresh the data between the Excel spreadsheet and the SharePoint list. However if the user is not connected to the internet or the SharePoint site is down I would like an error msg box to pop-up with the following text in the following format;
Connectivity Issue due to:
- The SharePointe is Currently Down or;
- You are not connected to the Internet or;
- You are using an outside interner connection without VPN
Potential Solutions;
- Please try again in 5 minutes
- If you are using an outside internet connection ensure you are logged into to VPN
- Contact Help Desk at Ext 2555
Please note that I have tried the code shown below but it would not show the error msg. It would just ask me to debug the code or end the function.
Here is the code I have so far;
I have a spreadsheet linked to a SharePointe list. I created a marco that is attached to a command button so that when it is activated it will refresh the data between the Excel spreadsheet and the SharePoint list. However if the user is not connected to the internet or the SharePoint site is down I would like an error msg box to pop-up with the following text in the following format;
Connectivity Issue due to:
- The SharePointe is Currently Down or;
- You are not connected to the Internet or;
- You are using an outside interner connection without VPN
Potential Solutions;
- Please try again in 5 minutes
- If you are using an outside internet connection ensure you are logged into to VPN
- Contact Help Desk at Ext 2555
Please note that I have tried the code shown below but it would not show the error msg. It would just ask me to debug the code or end the function.
Here is the code I have so far;
Code:
Sub Refresh()
'
' Refresh Macro
ActiveWorkbook.RefreshAll
On Error GoTo ErrMsg:
ActiveSheet.ListObjects("Table_owssvr_1").TableStyle = "Table Style 1"
Range("B:B,I:I").Select
Range("I1").Activate
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
Range("A3").Select
End With
Exit Sub
ErrMsg:
MsgBox ("Error Message will go here"), , "PLEASE READ"
End Sub
Last edited: