+ Reply to Thread
Results 1 to 4 of 4

Skipping code

  1. #1
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209

    Skipping code

    Hello I have some code as I step through it, it seems to bypass the if part after the for loop. As I step through the code, it goes from "For Custrow = 4 to Lastrow to the end with

    Please Login or Register  to view this content.
    Thank you for any help

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Skipping code

    Check the value of Lastrow is it 1?

    Then check the Text in "M3"
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Skipping code

    Why are you checking Range("M3").Value = "Email" inside the loop since nothing in the code i changing it?
    Ben Van Johnson

  4. #4
    Forum Contributor
    Join Date
    01-06-2019
    Location
    Australia
    MS-Off Ver
    2019
    Posts
    209

    Re: Skipping code

    The checking range M3 was just incase you want to send an email or save as pdf.

    I found the problem I forgot to change the sheet1 to sheet2.

    For some reason it was sheet2 but came pu as sheet 1 in the tab on excel.

    I saw it in the vba editor as sheet2, changed that and worked.

    Thank you for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. if statement skipping all the code in between VBA
    By sjk1193 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-07-2018, 03:24 PM
  2. VBA Email Code s skipping, I cannot see why
    By gassiusmax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2015, 02:18 PM
  3. Code skipping certain rows
    By Burt_100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2015, 05:49 AM
  4. VBA code for skipping blanks
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2015, 05:56 PM
  5. Code for skipping cells
    By samdaman91 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2013, 02:10 PM
  6. Skipping Code (for testing)
    By dugong in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2008, 12:25 PM
  7. Skipping sections of code
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2005, 09:06 AM

Tags for this Thread

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