R
Randy
I have an Excel 2003 spreadsheet with a simple table of server information:
Name: ServerMail7
IP: 10.124.3.12
etc...
Column A is the list of server names, column B is rack position.
In Visio 2007, I have succeeded in programmatically attaching the
spreadsheet, drawing a server in a particular spot, and autolinking
name-matched data from the spreadsheet to the server shapesheet.
Here's the problem:
Though I've written my VBA to use variables throughout, I currently have
static data hard coded into the variables. For instance:
dim nameServer as string
dim rackPosition as integer
nameServer = ServerMail21
rackPosition = 7
....and then the Sub puts a server image named ServerMail21 at rack position
7 in the diagram.
I have read and tried various uses of datarecordset, getdatarowIDs,
getrowdata, etc. but can't seem to get it to work (such as nameServer =
vsoData.getrowdata).
Can someone please help me out with a simple (wouldn't expect it to be more
than 4 or 5 lines) snippet that will go to the recordset, read row 1 column
1, make nameServer equal that, read row 1 column 2 and make rackPosition
equal that, <do my draw sub>, then go to row 2 column 1 and iterate through
the whole sheet?
I would post my current code and the attempts I've made, but I don't have
the code on my day-job PC.
Thanks for any and all assistance!
Name: ServerMail7
IP: 10.124.3.12
etc...
Column A is the list of server names, column B is rack position.
In Visio 2007, I have succeeded in programmatically attaching the
spreadsheet, drawing a server in a particular spot, and autolinking
name-matched data from the spreadsheet to the server shapesheet.
Here's the problem:
Though I've written my VBA to use variables throughout, I currently have
static data hard coded into the variables. For instance:
dim nameServer as string
dim rackPosition as integer
nameServer = ServerMail21
rackPosition = 7
....and then the Sub puts a server image named ServerMail21 at rack position
7 in the diagram.
I have read and tried various uses of datarecordset, getdatarowIDs,
getrowdata, etc. but can't seem to get it to work (such as nameServer =
vsoData.getrowdata).
Can someone please help me out with a simple (wouldn't expect it to be more
than 4 or 5 lines) snippet that will go to the recordset, read row 1 column
1, make nameServer equal that, read row 1 column 2 and make rackPosition
equal that, <do my draw sub>, then go to row 2 column 1 and iterate through
the whole sheet?
I would post my current code and the attempts I've made, but I don't have
the code on my day-job PC.
Thanks for any and all assistance!