ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trapping Error Message (https://www.excelbanter.com/excel-programming/436946-trapping-error-message.html)

Harn88

Trapping Error Message
 
Hi

I need help. I succesfully trap the error however I would like a msg box to
appear telling the user, which file the error was found.

My code:
On Error GoTo 100
100: MsgBox "Contact IS on 1300 850 669"

I don't know which function should I use to make the file that the user try
to access appear

For example the msg box would said

Contact IS on 1300 850 669 Path: G:\Finance\General\Accounting

Thank you for your help

Harn



Jacob Skaria

Trapping Error Message
 
Try

100: MsgBox "Contact IS on 1300 850 669" & vbLF & Err.Description

--
Jacob


"Harn88" wrote:

Hi

I need help. I succesfully trap the error however I would like a msg box to
appear telling the user, which file the error was found.

My code:
On Error GoTo 100
100: MsgBox "Contact IS on 1300 850 669"

I don't know which function should I use to make the file that the user try
to access appear

For example the msg box would said

Contact IS on 1300 850 669 Path: G:\Finance\General\Accounting

Thank you for your help

Harn




All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com