有关形状的一些操作函数
- 2020-05-27 08:00:00
- zstmtony 原创
- 352
Function shapeExists(shapeName As String) As Boolean
'returns TRUE if a shape named [ShapeName] exists on the active worksheet
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
If sh.Name = shapeName Then shapeExists = True
Next sh
End Function
Example usage:
If Not shapeExists("My Shape Name") Then MsgBox "Shape not found!"
List All Shapes
列出当前工作表中所有图形形状(shape)
Sub ListAllShapes()
'list all shapes on the active worksheet
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
Debug.Print "id=" & sh.ID, "name=" & sh.Name
Next sh
End Sub
删除所有形状
Sub DeleteAllShapes()
'delete all shapes on the active worksheet (Including CONTROLS, so use with caution!)
Dim sh As Shape
For Each sh In ActiveSheet.Shapes
sh.Delete
Next sh
End Sub
Sub 判断形状是否存在()
On Error GoTo info
Sheet1.Shapes("test").Select
Exit Sub
info:
MsgBox "不存在此形状"
End Sub
Access Activex第三方控件
- office使用部分控件时提示“您没有使用该ActiveX控件许可的问题”的解决方法
- RTF文件(富文本格式)的一些解析
- Access树控件(treeview) 64位Office下出现横向滚动条不会自动定位的解决办法
- Access中国树控件 在win10电脑 节点行间距太小的解决办法
- EXCEL 2019 64位版(Office 2019 64位)早就支持64位Treeview 树控件 ListView列表等64位MSCOMMCTL.OCX控件下载
- VBA或VB6调用WebService(直接Post方式)并解析返回的XML
- Access 或VBA 或VB6 使用 MS SOAP Toolkit 3.0 实现 SOAP Client客户端的功能
Access ADP Sql Server等
- MMC 不能打开文件C:/Program Files/Microsoft SQL Server/80/Tools/Binn/SQL Server Enterprise Manager.MSC 可能是由于文件不存在,不是一个MMC控制台,或者用后来的MMC版
- sql server连接不了的解决办法
- localhost与127.0.0.1区别
- Roych的浅谈数据库开发系列(Sql Server)
- sqlserver 自动备份对备份目录没有存取权限的解决办法
- 安装Sql server 2005 express 和SQLServer2005 Express版企业管理器 SQLServer2005_SSMSEE
- 解决Access数据库的Sql语句中 Top n 语句获取多条记录
文章分类
联系我们
联系人: | 王先生 |
---|---|
电话: | 13928102596 |
Email: | 18449932@qq.com |
QQ: | 18449932 |
微信: | 13928102596 |
微博: | officecn01 |