本文介绍了从vbscript搜索Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个vbscript,可将一些数据输出到由脚本本身创建的excel电子表格中.

我想做的是通过调出查找对话框来提供一种用于搜索电子表格的方法.

我尝试在工作表上添加按钮

i have a vbscript that outputs some data into an excel spreadsheet which is created by the script itself.

What I am trying to do is provide a way for the use to search that spreadsheet by bringing up the find dialog.

I''ve tried adding a button to the sheet

objXL.ActiveSheet.Buttons.Add(303.75, 16.5, 60, 20).Select
objXL.ActiveSheet.Shapes("Button 1").Select
objXL.Selection.Characters.Text = "Search"
objXL.ActiveSheet.Shapes("Button 1").Select
objXL.Selection.OnAction = ????? '' has to be a macro in the sheet and as the sheet ''is generated by the script, can''t see how I can use this method
objXL.Range("A1").Select



并将脚本中其他位置的功能分配给其onAction,但这不起作用.

我知道所有用户都必须按CTRL + F进行搜索,但是实际上是在工作表上提供一个由脚本创建的搜索按钮会很有用.

请问有人对如何执行此操作有任何想法吗?

感谢



and assign a function elsewhere in the script to its onAction but this doesn''t work.

I know all the user has to do it hit CTRL+F if they want to search, but it would be useful to provide a search button actually on the sheet as its created by the script.

Does anyone have any ideas how to do this please?

Thanks

推荐答案


这篇关于从vbscript搜索Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 21:52
查看更多