Using a string variable to reference an Object

I

ITXPURTS

Hi,
I'm constructing a computer room diagram where there are multiple racks with
equipment in each. I have a spreadsheet which has the RackName and
ShelfPosition and I would like the diagram to "move" the equipement from one
rack to another based one the data. I can move equipment up and down in a
shelf.

I am trying to use the ShapeSheets BeginX et al to include the RackName
variable that matches the Visio Shapename ie Rack is call Rack_A1 in both the
spread sheet and is the Visio Shapename as well.

I need to make the variable become the Shape Object so that I can use

BeginX =PAR(PNT(RackName!Connections.X1,RackName!Connections.Y1))

instead of
BeginX =PAR(PNT(Rack_A1!Connections.X1,Rack_A1!Connections.Y1))


Thanks
Alf
 
A

AlEdlund

The routine that I use passes in a parentname (rack or other component), the
component name, and the left/bottom or right/top slot connection points.
al

I use this to set the cell points via vba.

' build the cell formulas for connecting component to correct
cabinet
' and shelf. Visio 12 gets confused with some names if they
' are not delimited by an appostrophe
strBeginX = "PAR(PNT('" & strParent & "'!Connections." &
strParent_1 & ".X,'" & strParent & "'!Connections." & strParent_1 & ".Y))"
strEndX = "PAR(PNT('" & strParent & "'!Connections." &
strParent_2 & ".X,'" & strParent & "'!Connections." & strParent_2 & ".Y))"
strBeginY = "PAR(PNT('" & strParent & "'!Connections." &
strParent_1 & ".X,'" & strParent & "'!Connections." & strParent_1 & ".Y))"
strEndY = "PAR(PNT('" & strParent & "'!Connections." &
strParent_2 & ".X,'" & strParent & "'!Connections." & strParent_2 & ".Y))"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top