Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rainhard Fischer   on Jan 17 In MS Office Category.

  
Question Answered By: Bama Cohen   on Jan 17

I'm curious as to where you got that syntax for the Cell.Find method...
Could you give us a link or something????

You've put the right hand side of the test in uppercase but you've not made
sure the left hand side is also uppercase.
Example....
If Range("Mary!I" & row).value = "BIGSUPPLIER" Then
Should really be...
If UCase(Range("Mary!I" & row).value) = "BIGSUPPLIER" Then

Have you tried setting a breakpoint and stepping through the code to see
what happens??

Actually I'm assuming you know how to do that so just in case you don't....
Put the cursor on the first line of code and press F9
Or
Click in the grey vertical line to the left of the code window on
the first line of code.

You should see a red dot appear and the line highlighted in red.

When you run the code now then it will pause at that line and you can step
through it with F8.

That should show you which tests are being passed and which ones are
failing.
You can also look at and see the value of each of the variables or
expressions.

Personally I would use a Select Case construction rather than lots of
ElseIfs.

Share: 

 

This Question has 17 more answer(s). View Complete Question Thread

 


Tagged: