Results 1 to 3 of 3

If Statement in VBA

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    If Statement in VBA

    Hello:

    I am trying to use the code below to by pass and go to next count in PaystubCtr loop if value in Cell D3=0
    But I am getting error.
    Please help resolve this problem.
    Thank you

    Riz Momin


    For PaystubCtr = Cells(3, "P") To Cells(4, "P")
            Cells(1, "I") = PaystubCtr
            If D3 = 0 Then 
            Next PaystubCtr
            Else
            
            FPath = "C:\My Documents\Dropbox\Files\Test Payroll\"
            FName = Sheets("PDF Checks").Range("o5") ' Build the filename in O5 cell on Receipt sheet.
            
                Range("A1:D30").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
                FPath & FName, Quality:=xlQualityStandard, _
                IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
                False
        Next PaystubCtr
    Last edited by rizmomin; 10-13-2013 at 12:18 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  2. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  3. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  4. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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