Results 1 to 5 of 5

VBA conditions if statement not met?

Threaded View

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    Ghent, Belgium
    MS-Off Ver
    Excel 2003
    Posts
    17

    VBA conditions if statement not met?

    Hello,

    Below VBA code with 2 if statements, when running the code, both 'if' conditions are ignored and 'then' action is not executed. I tested these 'then' actions without if statement and these work fine so this should not be the problem.Can there be a problem with definition of variables RowData and RowFormula? Wrong datatype? Or can someone tell me what problem is?

    Dim RowData, RowFormula As Long
    RowData = ActiveSheet.Range("A3").End(xlDown).Row
    RowFormula = ActiveSheet.Range("H3").End(xlDown).Row

    If RowFormula < RowData Then
    ...
    End If

    If RowFormula > RowData Then
    ...
    End If

    Many thanks in advance!

    Regards,

    Kaatje
    Last edited by kaaver; 06-14-2010 at 11:40 AM.

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