+ Reply to Thread
Results 1 to 8 of 8

Never operate VBA code

  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    FRANCE
    MS-Off Ver
    Excel 2003
    Posts
    27

    Never operate VBA code

    hello

    With the following code:
    Is it possible to stop the execution if a value is in the range (W80: W744) is greenThank you for your help

    thank you

    Please Login or Register  to view this content.

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

    Re: Never operate VBA code

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Never operate VBA code

    Instead of a for next try

    i=80
    With Sheets("FEUIL1")
    Derlg = .Range("X" & .Rows.Count).End(xlUp).Row
    while i<=derlg and ????.value<>greenthank
    If Len(.Range("W" & i).Value) > 0 Then
    .Range("W" & i).Font.Color = vbRed
    Else
    .Range("W" & i).Value = .Range("X" & i).Value
    .Range("W" & i).Font.Color = vbGreen
    End If
    i=i+1
    wend
    End With

    ???? the tested value is not clear to me

  4. #4
    Registered User
    Join Date
    07-31-2013
    Location
    FRANCE
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Never operate VBA code

    thank you for your return

    Code does not work if a cell in the range (W80: W744) to a number in green

    I tested both code but none works

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

    Re: Never operate VBA code

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-31-2013
    Location
    FRANCE
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Never operate VBA code

    apparently it does not work

    I'll attach my file to be clearer

    thank you
    Attached Files Attached Files

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

    Re: Never operate VBA code

    Do you have a font with green in column W? I can not see it, may I am colour blind.
    Last edited by AB33; 08-26-2013 at 05:45 PM.

  8. #8
    Registered User
    Join Date
    07-31-2013
    Location
    FRANCE
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Never operate VBA code

    The macro duplicates the numbers of X column to column W

    Code vba copy numbers in green.

    existing numbers in the W column is red.

    I would not run if the code numbers in green are present

    Note: I delete the second code

    thank you for your help

+ 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. Operate scanner through vba
    By nnemrac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2013, 11:29 PM
  2. [SOLVED] Code Produces Error When Trying to Operate a Particular Userform after Another
    By JP777 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2012, 08:04 PM
  3. Change code to operate quickly on slower machine
    By BlastRanger in forum Excel General
    Replies: 10
    Last Post: 11-12-2010, 05:22 AM
  4. The formula to operate in shhet2 please.
    By Steved in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. The formula to operate in shhet2 please.
    By Steved in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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