+ Reply to Thread
Results 1 to 3 of 3

Error in While Loop - Cannot determine issue

Hybrid View

Business Error in While Loop - Cannot... 09-16-2013, 11:35 AM
Norie Re: Error in While Loop -... 09-16-2013, 11:55 AM
JOHN H. DAVIS Re: Error in While Loop -... 09-16-2013, 11:59 AM
  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    Victoria, Texas
    MS-Off Ver
    Excel 2010
    Posts
    1

    Error in While Loop - Cannot determine issue

    I am getting error code 1004 on the do while line in the following code. However, when run I do get the message "It is not blank." The conditions are the same for both the if statement and while statement, so I don't understand why I am getting an error. What am i missing?

        'clear existing data
        rowindex = Main_Row_FirstDataRow
        
        If Not Sheets("Main").Range(Main_Column_DXFCoordX & rowindex).Value = "" Then
            MsgBox "It is not blank"
        End If
        
        'I get an error on the following line
        Do While Not Sheets("Main").Range(Main_Column_DXFCoordX & rowindex).Value = ""
            rowindex = rowindex = 1
        Loop

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Error in While Loop - Cannot determine issue

    What's the error message?
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Error in While Loop - Cannot determine issue

    Maybe you put an equal sign instead of a plus or minus?

        Do While Not Sheets("Main").Range(Main_Column_DXFCoordX & rowindex).Value = ""
            rowindex = rowindex = 1
        Loop

+ 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. [SOLVED] CF - using a formula to determine which cells to format...ISSUE
    By AMSBenji in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2013, 08:43 AM
  2. Loop through columns determine if autofiltered
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2012, 10:35 PM
  3. Loop issue
    By punter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2011, 04:23 PM
  4. Loop/Array to Determine average distance traveled
    By Kwagga in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2008, 05:19 AM
  5. Loop issue
    By punter in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-07-2007, 07:49 PM

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