#1
|
|||
|
|||
Use VBA to import an access table
I have looked on the Access forums to export a table to VISIO without success. SO I am trying here to see if there is a way to import/link to an access table using VISIO VBA. I have written code in access to filter a table, and Open Visio, and close Access already.
Any suggestions? |
#2
|
||||
|
||||
Which version of Visio are you using. Visio Professional supports tables of data. But both Professional and Standard versions allow VBA to access data to automate drawings from other applications.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
I would look to use the standard if possible since a lot of computers have standard and not Pro. Thus I am looking for VBA specific.
|
#4
|
||||
|
||||
Post the code you already have and tell us how you want this data to appear in Visio. There isn't a 'table' object in Visio but you can import the data for use in adding, populating and arranging shapes.
An example of how this is done from Excel is https://www.mrexcel.com/forum/excel-...using-vba.html That example is only populating the text value of each shape dropped on the page. You can also populate other properties of a shape with code along the lines of aShp.CellsU("Prop.MyPropertyName").FormulaU = Chr(34) & "Hi mum" & Chr(34)
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
I have no code as of yet. I am trying to figure it out. I know that you can have VISIO import a table data. Same effect as a spreadsheet. I'll delve into the link you provided as a start.
|
#6
|
||||
|
||||
With Visio Professional, you can import a table into 'metadata' that sits in an Excel-like table in the file.
With both Visio Professional and Standard you can use VBA to make available that tabular data but you don't have a single metadata object to 'store' the tabular data and would therefore make use the data while the macro is running to build a graphic using particular master shapes according to the rules you specify in the code.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access denied while trying to import from .pst | ctharp | Outlook | 0 | 03-08-2016 09:24 AM |
Import autotext from a table? | eiol | Word | 5 | 01-07-2016 05:34 AM |
Import from .CUB files in MS Access | vamsikrishnad | Office | 0 | 12-30-2014 03:19 AM |
Import data from CSV to table | gebobs | Excel Programming | 4 | 10-20-2014 04:40 PM |
MS ACCESS - Import from Excel problem | Gregory_in_Montauk | Office | 6 | 05-06-2005 08:50 AM |