+ Reply to Thread
Results 1 to 3 of 3

Compile error reared its ugly head after I added an IF statement? :o(

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2010
    Posts
    97

    Compile error reared its ugly head after I added an IF statement? :o(

    Hi There,

    I have a bit of code that save the current sheet as a PDF, then uses the data in cells "B16,H8 and H10" to save as the file name.
    I needed to ammend it to include cell H8, (which works fine) but I also added two IF statements with message boxes to make sure all three fields were filled.

    The problem is that when I add the 2nd and 3rd IF statements I get a compile error but when I take them out it works?

    I've had a 2 hour head scratch now but cant figure it out! :o(

    Any pointers would be a godsend!!!

    Kind Regards
    Carl

    Please Login or Register  to view this content.
    Last edited by carlandtina02; 06-19-2013 at 06:11 PM. Reason: Using code tags

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Compile error reared its ugly head after I added an IF statement? :o(

    Please use code tags with your code.
    You have 3iffs and should end with 3 end iffs

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-14-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Compile error reared its ugly head after I added an IF statement? :o(

    Yeah happy days, Thanks AB33.

    I thought open and closed square brackets were the code tags? my mistake I'll look it up!

    Thanks again
    Carl

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1