LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Identify offending cell

I have these codes below. What I want to do is to identify in a message box
which cell has the error. So if I have text in cell A3, I want the message
box to tell me the error is in A3. Any ideas?

Sub ErrorExample()

On Error Resume Next

Dim total As Integer
Dim intA As Integer
Dim intB As Integer
Dim intC As Integer

intA = Range("A1")
intB = Range("A2")
intC = Range("A3")

total = intA + intB + intC

MsgBox ("Total is " & total)

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Formula to Identify Cell Khalid A. Al-Otaibi[_2_] Excel Discussion (Misc queries) 1 March 28th 10 08:50 AM
Identify the Current Cell Staanley Excel Discussion (Misc queries) 5 February 13th 08 11:16 AM
how to identify a cell address Alex Excel Programming 1 March 2nd 06 07:35 PM
Cell Ref to identify worksheet Mikeice[_12_] Excel Programming 1 June 9th 05 03:51 PM
pdf printing OFFENDING COMMAND: STACK: Matt Excel Programming 1 April 5th 05 08:40 PM


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"