码迷,mamicode.com
首页 > 其他好文 > 详细

VB为报表盖电子图章

时间:2016-03-08 19:41:24      阅读:133      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!