Tried to record Database Wizard V2003

D

dave

I've tried to record a macro of 'Database Wizard' and it is blank. It is
possible to pass parameters to the wizard using VBA?

Dave
 
M

Mark Nelson [MS]

The Database Wizard is a Visio add-on and does not participate in Macro
Recorded actions directly.
 
D

Dick Hamilton [MSFT]

And, it's not possible to pass arguments to the Database Wizard in general,
however (although this is probably more complex than you were looking for)
you can access the shapesheet programmatically through VBA to put data into
the User-defined cells used by the Database Wizard for the ODBC data
connectivity and then call Refresh/Update add-ons (that are part of the
Database Wizard) without parameters. Here is information on the
user-defined cells from the Visio 2003 online help:

When Visio links a shape to a database, it also creates a User-Defined Cells
section in the ShapeSheet spreadsheet, if that section doesn't already exist
for the shape. In this section, Visio stores information about:



· The primary key for the database table.

· Which database fields are associated with which ShapeSheet cells.

· The last valid data retrieved from the database.



So you could run through the Database Wizard once to setup the links between
shapes and database, and then look at the User Cells and see what’s needed
to programmatically update the “last valid data” cells and then call the
refresh/update add-ons. I hope this helps.

--
Dick Hamilton
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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