+ Reply to Thread
Results 1 to 3 of 3

Stuck in a loop

  1. #1
    Registered User
    Join Date
    03-03-2011
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    16

    Stuck in a loop

    Hi again. I have been working for a couple of hours now and I am still stuck in loop He!!.

    Hoping a fresh set of eyes can spot what I am doing wrong.

    The loop gets stuck in the 1st input file and finally does a "run-time error 1004" before entering the "If Pass = 2" part of code.

    Thanks in advance.

    Updated with full code. I know I have too many Dim's but I am trouble shooting a bigger piece of code and didn't feel like removing the extras.

    Please Login or Register  to view this content.
    Last edited by dem86; 03-11-2011 at 01:23 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Stuck in a loop

    Hello dem86,

    Part of the problem is you are attempting to use a numerical text string for a real number in this statement:
    Please Login or Register  to view this content.

    The line should be this:
    Please Login or Register  to view this content.

    The other problem may be with your function LastRow. Since you did not provide the code, I can not say for sure.

    There are 2 habits should cultivate as a VBA programmer[List="*"][*] Using Option Explicit at the top of your code modules.[*] Declaring your Variables and their type: Integer, Long, String, etc.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    03-03-2011
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Stuck in a loop

    Here is my LastRow & LastCol code

    Please Login or Register  to view this content.

+ 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