请问Excel有没有办法显示所有的WorkSheet?

来自故乡的风 2010-08-12 12:18:25
如果一个Excel文件里包含很多WorkSheet,会有箭头帮助选择要使用哪一个。今天老板问我一个问题,能不能让所有的WorkSheet都显示在同一个页面(换行也没问题),这样就不用来回翻查找了。

请问各位高手能实现吗?谢谢!


...全文
339 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
supercucu 2010-08-12
  • 打赏
  • 举报
回复
OYO ~~那些箭头哦
laoyebin 2010-08-12
  • 打赏
  • 举报
回复
不用那么麻烦,在坐下角那些箭头那边右击就可以了
来自故乡的风 2010-08-12
  • 打赏
  • 举报
回复
刚才在一个网站上找到一种方法,就是在EXCEL的Mcros里写上一段程序,一运行就新建一张目录表
还有更好的办法吗?我得分给谁呢?

http://www.mrexcel.com/archive/Edit/1059.html
===================================================
Sub CreateTOC()
Dim CurSheet As Worksheet
Dim sSheetNames() As String
Dim iCounter As Integer
Dim iX As Integer

'If the workbook already has a TOC sheet, delete it
For Each CurSheet In Application.Worksheets
If CurSheet.Name = "TOC" Then
Application.DisplayAlerts = False
CurSheet.Delete
Application.DisplayAlerts = True
End If
Next CurSheet

iCounter = 0

'Put all sheet names in this workbook in an array
For Each CurSheet In Application.Worksheets
CurSheet.Activate

'Add one element to the array
ReDim Preserve sSheetNames(iCounter)

'Get the sheet name
sSheetNames(iCounter) = CurSheet.Name

'Increment the counter
iCounter = iCounter + 1
Next CurSheet

'Add new TOC sheet
Worksheets.Add Before:=Worksheets(1)
Application.ActiveSheet.Name = "TOC"

'Add Hyperlinks to the TOC sheet
For iX = 1 To UBound(sSheetNames)
Application.Range("A" & iX).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=sSheetNames(iX) & "!A1"
Next iX

Columns("A:A").EntireColumn.AutoFit
Application.Range("A1").Select
End Sub




亮剑_ 2010-08-12
  • 打赏
  • 举报
回复
注意有可能会有隐藏的Sheet
tmdhdx 2010-08-12
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 laoyebin 的回复:]
不用那么麻烦,在坐下角那些箭头那边右击就可以了
[/Quote]呵呵~~~ 学习了。。。

6,210

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office应用
社区管理员
  • Microsoft Office应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧