谁能告诉我 visio VBA的2次开发 数据库用EXCEL

2025-01-07 16:46:03
推荐回答(3个)
回答1:

EXCEL
这个做数据库。。。。。没搞过。。。ACCESS做数据库才差不多。

visio中就有
帮助--》开发人员参考!!

Sample Microsoft VBA macro

For each drawing file that is open in the Microsoft Visio instance, the sample Microsoft Visual Basic for Applications (VBA) macro shown below does the following:

Logs the name and path of the drawing file in the Immediate window
Logs the name of each page in the Immediate window
Here is a look at the code in the program and what it does.

Public Sub ShowNames ()
'Declare object variables as Visio object types
Dim pagObj As Visio.Page
Dim docObj As Visio.Document
Dim docsObj As Visio.Documents
Dim pagsObj As Visio.Pages
'Iterate through all open documents
Set docsObj = Application.Documents
For Each docObj In docsObj
'Print the drawing name in the Visual Basic Editor
'Immediate Window
Debug.Print docObj.FullName
'Iterate through all pages in a drawing
Set pagsObj = docObj.Pages
For Each pagObj In pagsObj
'Prints the page name in the Visual Basic Editor
'Immediate Window
Debug.Print Tab(5); pagObj.Name
Next
Next
End Sub

Here is an example of the program's output, assuming Office.vsd and Recycle.vsd are open and have been saved in the specified locations.

Sample output
Description

c:\visio\solutions\Office.vsd
The name of the first drawing

Background-1
The name of page 1

Background-2
The name of page 2

c:\visio\solutions\Recycle.vsd
The name of the second drawing

Page-1
The name of page 1

Page-2
The name of page 2

Page-3
The name of page 3

You can find more information about writing a program using the VBA environment and about the Visual Basic Editor in the Microsoft Visual Basic Help (in the Visual Basic Editor window, click Microsoft Visual Basic Help on the Help menu).

You can find details about using a specific Visio object, property, method, or event in the Automation Reference included in this Developer Reference (on the Visio Help menu, click Developer Reference).

Note If you did not install the Developer Reference at the time you installed Visio, clicking the Developer Reference command on the Help menu will automatically start its installation.

Point method

Returns a point at a position along a curve.

Version added

5.0

Syntax

object.Point(t, x, y)

object
Required. An expression that returns a Curve object.

t
Required Double. The value in the curve's parameter domain to evaluate.

x
Required Double. Returns x value of curve at t.

y
Required Double. Returns y value of curve at t.

Remarks

A Curve object describes itself in terms of its parameter domain, which is the range [Start(),End()]. The Point method of a Curve object returns the x,y coordinates at position t, which is any position along the curve's path. The Point method can be used to extrapolate the curve's path outside of [Start(),End()].

http://msdn.microsoft.com/zh-cn/library/cc160740.aspx
Visio 对象模型概述

回答2:

详细资料发我QQ邮箱看看,帮你研究研究。81439814

回答3:

VISIO 电缆 有研究吗?可以共同探讨,联系一下。