Consulting

Results 1 to 8 of 8

Thread: Manipulating Shapes in VBA

  1. #1
    VBAX Newbie
    Joined
    Feb 2010
    Posts
    4
    Location

    Manipulating Shapes in VBA

    Hi,

    I'm new to the forms and relatively new to VBA. I'm a business student taking an engineering class with no prior programming experience. I just need some help getting this w/s to follow the rules of a game. The sheet is attached.

    The rules are:

    You start node1 and you can only click on node2 or node4, etc. You can only jump on a node that is attached to yours by arrows called Paths. If you going to ThisWorkbook in vba you'll see that their invisible.

    I need code for when user clicks from currentNode to another legal Node, the invisible arrow inbetween becomes visible.

    The problem is, since its invisible to begin with, an error comes up saying the shape is locked. How do i get to that unlocked shape?

    also, how do I determine in code which moves are legal and which arent, IF statements?

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    can you save it as an xls file and post that?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Newbie
    Joined
    Feb 2010
    Posts
    4
    Location
    sure here it is

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I found all of the arrows grouped, and 1_2 was the name of the group. If I ungrouped them, added an arrow 1_2, it worked fine.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Newbie
    Joined
    Feb 2010
    Posts
    4
    Location
    I don't understand. The Group of all the arrows is named Paths, the arrow pointing node1 to node2 is called 1_2. I need to leave them grouped, because the arrow's are set not to appear when the workbook opens.

    I was hoping to find help being able to call an arrow to be visible individually depending on what node is selected?

  6. #6
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Here's a page of my Excel Object model for excel 97. See if it helps you with your homework.

    See the cell comments for help text.

    SamT
    Edit: IIRC, You were using the construct "Sheets(3)." Use instead "Sheets(sheet3)."
    Last edited by SamT; 02-27-2010 at 08:39 PM.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by cardona7
    I don't understand. The Group of all the arrows is named Paths, the arrow pointing node1 to node2 is called 1_2. I need to leave them grouped, because the arrow's are set not to appear when the workbook opens.

    I was hoping to find help being able to call an arrow to be visible individually depending on what node is selected?
    Just set them all to non-visible on open, there are only a few.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    VBAX Newbie
    Joined
    Feb 2010
    Posts
    4
    Location
    Is it possible to set the group of arrows, "Paths" to visible = false....then recall the arroows individually based on which node path is taken??

    attached is the finished sheet.......

    I hid all the arrows individually then I'm able to recall them one by one.....


    but the assignment calls for them to be grouped......

    is it even possible???

Posting Permissions

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