If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
automatic refresh of linked shapes
Hi all,
I have a drawing in visio which is linked to a database. I want the drawing to change when the database change. I am using a mdb database with odbc driver. I select automatic update each five seconds. But it is not working. To update, i have to select a shape then run the add-on refresh database. am i missing somtehing? Is it possible to do auto refresh? Is there a way to have a timed events that will execute the regresh command in vb code? regards, pierre |
#2
|
|||
|
|||
This from a previous submitter...
Al From Page 759 of Microsoft Visio Version 2002 Inside and Out book. 1) Tools / Macros/ Visio Extras / Database Wizard 2) Click Next 3) Select "Create A Linked Drawing or Modify An Existing One", and click Next 4) Select "Add Database Actions And Events To a Drawing Page", and click Next 5) Choose your Visio Drawing and page 6) Check the "Refresh linked shapes on document open", and click Next 7) Click Finish I tried this out a while back and was disappointed because you have to do this for every page that contains a linked shape and my visio document contained more than a hundred pages. So wrote a macro that loops through all pages refreshes them with the database. I'm sure there is a way to make the macro run when the document opens although I don't know what it is off hand. Hope this helps. ' DatabaseRefresh ' ' This macro loops through all pages of your visio document and ' performs a Database Refresh by executing the Addon for refreshing ' the database ("Database Refresh"). Public Sub DatabaseRefresh() Dim pg As Visio.Page Dim OriginalPg As Visio.Page ' Record the original page Set OriginalPg = ActiveWindow.Page ' Loop through each page of the document For Each pg In ThisDocument.Pages ' Set the page to be the active page ActiveWindow.Page = pg.Name ' Execute the "Database Refresh" Addon Application.Addons("Database Refresh").Run "" ' Increment the page counter Next pg ' Set the active page back to the original one so the ' user doesn't end up on the last page ActiveWindow.Page = OriginalPg.Name End Sub "PF" wrote in message . .. Hi all, I have a drawing in visio which is linked to a database. I want the drawing to change when the database change. I am using a mdb database with odbc driver. I select automatic update each five seconds. But it is not working. To update, i have to select a shape then run the add-on refresh database. am i missing somtehing? Is it possible to do auto refresh? Is there a way to have a timed events that will execute the regresh command in vb code? regards, pierre |
#3
|
|||
|
|||
This from a previous submitter...
Al From Page 759 of Microsoft Visio Version 2002 Inside and Out book. 1) Tools / Macros/ Visio Extras / Database Wizard 2) Click Next 3) Select "Create A Linked Drawing or Modify An Existing One", and click Next 4) Select "Add Database Actions And Events To a Drawing Page", and click Next 5) Choose your Visio Drawing and page 6) Check the "Refresh linked shapes on document open", and click Next 7) Click Finish I tried this out a while back and was disappointed because you have to do this for every page that contains a linked shape and my visio document contained more than a hundred pages. So wrote a macro that loops through all pages refreshes them with the database. I'm sure there is a way to make the macro run when the document opens although I don't know what it is off hand. Hope this helps. ' DatabaseRefresh ' ' This macro loops through all pages of your visio document and ' performs a Database Refresh by executing the Addon for refreshing ' the database ("Database Refresh"). Public Sub DatabaseRefresh() Dim pg As Visio.Page Dim OriginalPg As Visio.Page ' Record the original page Set OriginalPg = ActiveWindow.Page ' Loop through each page of the document For Each pg In ThisDocument.Pages ' Set the page to be the active page ActiveWindow.Page = pg.Name ' Execute the "Database Refresh" Addon Application.Addons("Database Refresh").Run "" ' Increment the page counter Next pg ' Set the active page back to the original one so the ' user doesn't end up on the last page ActiveWindow.Page = OriginalPg.Name End Sub "PF" wrote in message . .. Hi all, I have a drawing in visio which is linked to a database. I want the drawing to change when the database change. I am using a mdb database with odbc driver. I select automatic update each five seconds. But it is not working. To update, i have to select a shape then run the add-on refresh database. am i missing somtehing? Is it possible to do auto refresh? Is there a way to have a timed events that will execute the regresh command in vb code? regards, pierre |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pivot chart, automatic refresh | VILLABILLA | Charts and Charting | 2 | May 27th, 2004 10:36 PM |
Formulas employing cells linked to a combo box drop list | Frank Kabel | Worksheet Functions | 3 | May 27th, 2004 04:44 PM |
A macro to open files, refresh data, and close file in background? | Don Guillett | Worksheet Functions | 1 | May 5th, 2004 12:20 PM |
A macro to open files, refresh data, and close file in background? | denisecook | Worksheet Functions | 1 | May 4th, 2004 03:16 PM |