+ Reply to Thread
Results 1 to 2 of 2

Macro. When "If" function right mcaro stops

  1. #1
    Registered User
    Join Date
    12-17-2014
    Location
    Lithuania
    MS-Off Ver
    2010
    Posts
    4

    Macro. When "If" function right mcaro stops

    Hy,

    Thera are few "If" functions on one macro. And I want to do when first "if" is right macro would stop and do not continue reading commands further. I don't know is it even possible. If you dont udenstand me:


    Sub macro1()

    Sheets("Bill").Select
    Range("A13").Select
    Test = ActiveCell.Cells
    If (Test = 0) Then

    Sheets("Sąskaita").Select
    Range("B13:D13").Select
    ActiveCell.FormulaR1C1 = "Car rent"

    End If

    (IN THIS PLASE I WANT TO DO THAT MACRO STOP IF FIRST "IF" TEST IS TRUE (above) AND WOULD NOT READ SECOND "IF" COMMAND (BELLOW)


    Sheets("Sąskaita").Select
    Range("A13").Select
    Test = ActiveCell.Cells
    If (Test = 1) Then
    Sheets("Sąskaita").Select
    Range("B14:D14").Select
    ActiveCell.FormulaR1C1 = "Automobilio nuoma"

    End If

    End Sub

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro. When "If" function right mcaro stops

    Please Login or Register  to view this content.
    Last edited by AB33; 12-17-2014 at 02:30 PM.

+ 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] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. Application.Wait Now + TimeValue("00:00:10"), but it stops my workbook also.
    By esbenhaugaard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 04:50 PM
  3. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  4. [SOLVED] macro stops on "selection.autofilter" line of code
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-10-2005, 10:55 AM
  5. Please add a "sheet" function like "row" and "column" functions
    By Spreadsheet Monkey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2005, 12:15 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