Dynamic Variable Lists OR link a Shape to a Form

Started by Feanor3, April 02, 2009, 04:29:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Feanor3

Is there a way to make a variable list that's content is based on the value of the variable list before it?
I am guessing not, so, in that case:

How do I link a shape to a vba form so that I can edit its shape properties based on user input from the form?

rodsoares101


Feanor3

Yes, actually, I have almost everything good to go that's in that code, but what I am missing is taking what the user selects on the form and applying it to the shape the code was ran from.

Feanor3

Passing a Shape to a Form for modification not possible?

vojo

another option without any VBA...though kludgy to implement (have done it a couple of times)...is to use custom properties and user cells and actions to create such a list.

Overall....here is how you can do this
    Set up an action sets the general context and have that in the right click menu
          (I assume there is some bound on the values involved...cant be a stream of consciousness)
    Set up another action that sets the specific group of custom propos to show...add to rt click menu.
    etc as far as you want to tunnel down

    have indexs in user cells.... something like user.globalindex   and user.localindex
   
    Set some custom properties for the global value (fixed list of possibilities)
        (like machine info, port info, memory info, location info, etc)
    set detailed custom properties for local values
        (like for machine ==> SN, PN, EC number
        (like for port info ==> type, MAC/WWN, speed, etc)
        (etc)
   
    set the detailed custom properties to be  visibile based on globalindex + localindex

    Good to go.

If you really want to do this...start with a simple shape...get the hang of it...then look at what you really want to do on your real shapes...go from there.
   

mmulvenna

Quote from: Feanor3 on April 02, 2009, 06:15:09 PM
Yes, actually, I have almost everything good to go that's in that code, but what I am missing is taking what the user selects on the form and applying it to the shape the code was ran from.
If i am understanding you correctly.....

If you put something like this in the action section of the shape sheet
  =CALLTHIS("toekick_routines.insert_optional_toekick",,Sheet.22!User.toekick)

This will pass the shape to your routine.

Sub insert_optional_toekick(shpobj As Visio.shape, strtoekickname As String)



shpobj will contain the  shape that the user executed the code from.

you can then use that to get any info from that shape and fill your VBA form.

On a save or exit you can then

get the individual cells of that shape and update them appropriately with the info from your VBA form


Good Luck
Mike