首页 > 其他 > 详细

VB为报表盖电子图章

时间:2016-03-08 19:38:54      阅读:282      评论:0      收藏:0      [点我收藏+]

技术分享

图中右下角是电子图章,VB代码如下:

Dim shp As Object
Dim DZTZ As String

DZTZ = ThisWorkbook.Path & "\" & "YWTJTZ.JPG"
If Dir(DZTZ) = "" Then
MsgBox "目录下没有电子图章。", vbInformation, "提示"
End If

Set shp = ActiveSheet.Pictures.Insert(DZTZ)
With shp
.Left = ActiveCell.Left + Int((ActiveCell.Width - 40) / 2)
.Top = ActiveCell.Top + Int((ActiveCell.Height - 40) / 2)
.Height = 40
.Width = 40
End With
Set shp = Nothing

VB为报表盖电子图章

原文:http://www.cnblogs.com/lvyangyinli/p/5255211.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!