LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default With and End With issue

The following portion of code has got the wrong amount of 'End If', 'End
With' etc, is it possible someone can see the fault with this?

Thanking you
Pat

For Each Target In rng1
sProd = Target.Parent.Cells(Target.Row, 26)

res = Application.Match(sProd, _
Worksheets("PList").Range("L30:L950"), 0)
If Not IsError(res) Then
With Worksheets("PList")

If IsNumeric(Target.Value) Then
Set rng2 = .Cells(res + 29, icol)
rng2.Value = rng2.Value - Target.Value
End If
End With
Else
MsgBox "Product Not found: " & sProd

End If

End With
Else
MsgBox Target.Address & " Caused an Error"
Resume Next
On Error Resume Next
End If
Next


 
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
big issue pierre Excel Discussion (Misc queries) 2 February 20th 09 09:03 AM
I believe that this is a set up issue... jsylvester Setting up and Configuration of Excel 2 January 21st 09 06:41 PM
issue.... pierre Excel Discussion (Misc queries) 3 May 11th 08 06:24 PM
Issue [email protected] Excel Discussion (Misc queries) 1 July 21st 06 05:13 AM
ADO Issue Seth[_5_] Excel Programming 0 November 12th 03 06:23 PM


All times are GMT +1. The time now is 04:15 PM.

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

About Us

"It's about Microsoft Excel"