On Fri, Oct 3, 2008 at 4:41 PM, JHB <[EMAIL PROTECTED]> wrote:

>
> I am totally new to Visual Basic, and am working on an Excel
> spreadsheet. I have a number of macros, and one that I cannot make
> work. It is as follows:
>
> Sub setlowest()
> '
> ' setlowest Macro
> ' Macro recorded 10/3/2008 by John
> '
> Sheets("Menu").Select
>
>
> If Range("D33").Value > Range("d42").ValueThen Then GoTo getout
> Else
>    Range("D33").Select
>    Selection.Copy
>    Range("D42").Select
>    ActiveSheet.Paste
>    Range("C33").Select
>    Selection.Copy
>    Range("E42").Select
>    ActiveSheet.Paste
> End If
> getout:
> End Sub
>


you seem to be ending your If statement while you're still in you're else
clause.





>
> I get an error that I have an "else" statement  without an "if". I can
> see the "if" there but its clear that there is something I have not
> done that I should have done. Can someone tell me what I need to do to
> make this macro work, please.
>
> >
>


-- 
Charles A. Lopez
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to