Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2003
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copying an Autoshape ForeColor (2002)

    The attached one slide presentation show why VBA infuriates me!

    The VBA attached to the command button copies the ForeColor from rounded rectangle 1 to both rounded rectangle 2 and rounded rectangle 3.

    So why does it not work for rounded rectangle 3 (answer further down page).

    There are no error messages, no indication of this in Help.

    No need to reply, I'm just venting my frustration on spending most of a nice sunny day sorting it out! (AHHHHHH!)



































    Answer: Rounded rectangle 2 is Filled with White and rounded rectangle 3 is set to No Fill
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copying an Autoshape ForeColor (2002)

    PowerPoint VBA can be very frustrating because its object model is rather idiosyncratic and is more limited than that of Word and Excel. But here, it is behaving exactly as intended. It's rather obvious that one rectangle has no flll color:
    - The mouse pointer is a NorthWest arrow instead of a four-pointed arrow if it is over the interior of the rectangle.
    - Clicking inside the rectangle doesn't select it.
    - If you drag it partly off the slide, the gray background shows through.
    (And of course, ging the slide anohter background color than white would also have made it clear instantly that the rectangle was transparent).

  3. #3
    Lounger
    Join Date
    Jan 2003
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copying an Autoshape ForeColor (2002)

    Of course your are right Hans (I've calmed down now).

    It is just that if VBA had said something like: You can not set the foreground colour of this shape as it is set to No Fill and will not be displayed. I would not have sat all day at my computer and could have been planting my runner beans with the sun on by back.

    Many thanks, I'm sure to be back soon.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copying an Autoshape ForeColor (2002)

    I can understand it's frustrating, but this behavior is by design. In all Office applications you can set the fill color of a shape while it is transparent. This can be useful - you can prepare the fill for a shape (which can be complicated, with multi-color gradients), and then make the fill visible with a single instruction.

  5. #5
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts

    Re: Copying an Autoshape ForeColor (2002)

    You might be interested in another way to code this. It will work with no fill shapes!!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •