Re: If then several times

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



What do you mean by "why won't...if statements run?" Do you mean they
are not evaluated? Or that the 'do whatever' part is not executed?

What is the value of the active cell? What does the first 'DO
whatever' actually contain?

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article <758A4227-C222-4E5D-8DFE-E1BAE38B3161@xxxxxxxxxxxxx>,
John@xxxxxxxxxxxxxxxxxxxxxxxxx says...
> I seem to be having a problem running a macro that uses several if then
> statements. Here is an example... why won't the second third, fourth if
> statements run?
>
> If Activecell.value = 1 then
> DO whatever
> end if
> If activecell.value =2 then
> do whatever
> end if
> Ifactivecell.value = 3 then
> do whatever
> end if
> end sub
>
.



Relevant Pages