?? 17914.html
字號:
<html> <head> <title>Re: VB呼叫excel巨集</title> </head> <body bgcolor="#FFFFFF" vlink="#808080"> <center> <h1>Re: VB呼叫excel巨集</h1> </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by dino on August 26, 1999 at 12:25:42:<p>In Reply to: <a href="17907.html">Re: VB呼叫excel巨集</a> posted by Arthur on August 26, 1999 at 10:07:10:<p>Option Explicit<br>Dim Db As Database<br>Dim Rs As Recordset<p>Private Sub Form_Load()<br> Set Db = OpenDatabase("xls file path", False, False, "Excel 8.0;")<br> Set Rs = Db.OpenRecordset("sheet1$")<br>End Sub<p>以上述方式是否無法開啟marco?<p>我以O(shè)LE方式去create excel object<br>已經(jīng)可以去建立chart<br>class宣告大致如下:<br>Private mxlApp As Excel.Application<br>Private mxlBook As Excel.Workbook<br>Private mxlSheet As Excel.Worksheet<br>Private mxlChart As Excel.Chart<br>Private mxlActive As Boolean<p>Private Property Get xlApp() As Excel.Application<br>If mxlApp Is Nothing Then<br> Set mxlApp = GetExcelObject<br>End If<br>Set xlApp = mxlApp<br>End Property<p>Private Property Get xlBook() As Excel.Workbook<br>'# prepare a workbook<br>If mxlBook Is Nothing Then<br> Set mxlBook = xlApp.Workbooks.Add<br>End If<br>Set xlBook = mxlBook<br>End Property<p>Private Property Get xlSheet() As Excel.Worksheet<br>'# Prepare a worksheet<br>If mxlSheet Is Nothing Then<br> Set mxlSheet = xlBook.Worksheets(1)<br>End If<br>Set xlSheet = mxlSheet<br>End Property<p>Private Property Get xlChart() As Excel.Chart<br>'# prepare a chart<br>If mxlChart Is Nothing Then<br> Set mxlChart = xlApp.Charts.Add<br>End If<br>Set xlChart = mxlChart<br>End Property<p>可是一直不知marco的相關(guān)properity.<br>原理我知道,但有沒有人試過?有無sample?<br>感激不盡!<br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 17914--><!--top: 17924--><li><a href="17924.html">Re: VB呼叫excel巨集</a> <b>Arthur</b> <i>17:33:48 8/26/99</i>(<!--responses: 17924-->3)<ul><!--insert: 17924--><!--top: 17934--><li><a href="17934.html">Re: VB呼叫excel巨集</a> <b>dino</b> <i>21:04:39 8/26/99</i>(<!--responses: 17934-->2)<ul><!--insert: 17934--><!--top: 17955--><li><a href="17955.html">Re: VB呼叫excel巨集</a> <b>sandy</b> <i>09:32:33 8/27/99</i>(<!--responses: 17955-->1)<ul><!--insert: 17955--><!--top: 17960--><li><a href="17960.html">Re: VB呼叫excel巨集</a> <b>Arthur</b> <i>10:20:48 8/27/99</i>(<!--responses: 17960-->0)<ul><!--insert: 17960--></ul><!--end: 17960--></ul><!--end: 17955--></ul><!--end: 17934--></ul><!--end: 17924--></ul><!--end: 17914--><br><hr size=7 width=75%><p></body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -