Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 4616|回复: 5

[已解决]如何用代码判断a1单元格里是否有批注?谢谢!

[复制链接]
发表于 2011-1-19 18:27 | 显示全部楼层 |阅读模式
如何用代码判断a1单元格里是否有批注?谢谢!
最佳答案
2011-1-19 18:43
回复 yqdfd 的帖子

请几天我问过的,借花献佛了:
  • Sub test()
  • If Intersect([A1], Cells.SpecialCells(xlCellTypeComments)) Is Nothing Then
  • MsgBox "没有批注!"
  • End If
  • End Sub
发表于 2011-1-19 18:38 | 显示全部楼层
Selection.SpecialCells(xlCellTypeComments).Select  用录制宏的方法。定位-批注
回复

使用道具 举报

发表于 2011-1-19 18:43 | 显示全部楼层    本楼为最佳答案   
回复 yqdfd 的帖子

请几天我问过的,借花献佛了:
  • Sub test()
  • If Intersect([A1], Cells.SpecialCells(xlCellTypeComments)) Is Nothing Then
  • MsgBox "没有批注!"
  • End If
  • End Sub
回复

使用道具 举报

发表于 2011-1-19 18:45 | 显示全部楼层
QQ截图未命名.jpg
回复

使用道具 举报

发表于 2011-1-19 18:48 | 显示全部楼层
Sub test()

If Not Range("a1").Comment Is Nothing Then

MsgBox "有批注"
Else

MsgBox "没有批注"
End If

End Sub
回复

使用道具 举报

 楼主| 发表于 2011-1-19 18:48 | 显示全部楼层
谢谢,楼上几位
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-20 06:51 , Processed in 0.283665 second(s), 10 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表