Results 1 to 5 of 5

If function based on color of the shape

Threaded View

  1. #1
    Registered User
    Join Date
    04-21-2013
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    5

    If function based on color of the shape

    Short description:

    I need to do little project on VBA and this is what I've come up: a car does laps based on number of laps user entered. But there is also a traffic light,
    and if the traffic light is green, it does a normal lap, but if it's red, it has to do the bigger one. Problem is that I have no clue how to read the color value from a shape.

    I will also add my file so you can take a look: Sheet2Problem.xlsm

    For example:
    if shape("light").color=green then
    do
    car_1.incrementleft speed + rnd()*10
    paus 0.04
    loop until car_1.left > line_5.left
    or something like that.
    Last edited by mjoll; 04-21-2013 at 12:50 PM.

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