D
DS NTE
In a workbook on my local PC I have a commandbutton to update links from a
workbook located on a server. The code is shown below. If the connection to
the server is broken and I click the button I get a windows dialog window
which prompts me for the filename of the remote workbook. I have added
errorhandling, but that only fires when i click Cancel in the above
mentioned window.
So my question is: How can I set this up so the user gets informed that the
network connection is lost ?
Sub OppdaterFraTSPC()
'Oppfrisker data fra TSPC-arbeidsboka
On Error GoTo ErrorHandler
ActiveWorkbook.UpdateLink Name:= _
"G:\DRSENT\02.Ukerapporter\TSPC rapporter\Avregningsrapport Ekstern
Leveranse.xls" _
, Type:=xlExcelLinks
Exit Sub
ErrorHandler:
MsgBox "Oppdatering ikke tilgjengelig, bruk/modifiser eksisterende
data.", vbCritical, "Noe gikk galt..."
End Sub
mvh
Knut Egil
workbook located on a server. The code is shown below. If the connection to
the server is broken and I click the button I get a windows dialog window
which prompts me for the filename of the remote workbook. I have added
errorhandling, but that only fires when i click Cancel in the above
mentioned window.
So my question is: How can I set this up so the user gets informed that the
network connection is lost ?
Sub OppdaterFraTSPC()
'Oppfrisker data fra TSPC-arbeidsboka
On Error GoTo ErrorHandler
ActiveWorkbook.UpdateLink Name:= _
"G:\DRSENT\02.Ukerapporter\TSPC rapporter\Avregningsrapport Ekstern
Leveranse.xls" _
, Type:=xlExcelLinks
Exit Sub
ErrorHandler:
MsgBox "Oppdatering ikke tilgjengelig, bruk/modifiser eksisterende
data.", vbCritical, "Noe gikk galt..."
End Sub
mvh
Knut Egil