9210.html
来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 23 行
HTML
23 行
<html>
<head>
<title>Bravo! I Got the Answer!</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Bravo! I Got the Answer!</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:told_me@www.hotmail.com">Tommy_Lee</a> on January 14, 1999 at 19:26:53:<p>
In Reply to: <a href="9170.html">如何得到一个 excel file 中所有的sheet的数量及name???</a> posted by Tommy Lee on January 13, 1999 at 20:33:13:<p>
I have found the solution as following:<p> 'Open the OLE Automation<br>Set myExcel=GetObject(XFile)<br> 'Open the ExcelFile U want<br>myExcel.Parent.Windows(XFile).Active<br> 'Getting the Number of Sheet<br>stCount=my.Application.sheets.Count<br> 'make a loop to got the sheet's Name<br>For i=1 To sheetCount<br> myExcel.Application.sheets(i).Select<br> stName(i)=myExcel.application.activesheet.Name<br>Next i<p>Then I got the all sheet's name <p>It is so woundful to know this website......<br>I hope that everyone appreciates it like me!<p><br> <br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 9210-->
</ul><!--end: 9210-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?