Results 1 to 3 of 3

Multiple Conditions on DO WHILE?

Threaded View

  1. #1
    Registered User
    Join Date
    12-25-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2013
    Posts
    81

    Multiple Conditions on DO WHILE?

    Reading through file names in a directory and want to exit the loop after processing the first file (for test purposes)

    Did not work.
    Do While FileName <> "" Or RecordCount = 1
    I had to change the code to:

    Do While FileName <> ""
          If RecordCount = 1 Then
             Exit Do
          End If
    Did I write it wrong the first way or are multiple conditions now allowed? I didn't get a compile error.
    Last edited by jeffreybrown; 05-09-2019 at 12:51 PM. Reason: Please use code tags!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 29
    Last Post: 01-01-2017, 10:25 AM
  2. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  3. [SOLVED] Macro for data present in multiple rows and columns following multiple conditions
    By macrolearnerkk in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-07-2015, 11:20 AM
  4. [SOLVED] Vlookup - Country conditions (Multiple conditions)
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 11:42 AM
  5. Replies: 0
    Last Post: 08-14-2012, 01:18 PM
  6. Replies: 1
    Last Post: 12-05-2010, 04:39 AM
  7. [SOLVED] How to multiple conditions to validate more than 2 conditions to .
    By Bhuvana Govind in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2005, 04:06 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