|
发表于 2012-1-17 16:21
|
显示全部楼层
本楼为最佳答案
- Sub test1()
- Dim i As Integer, h As Integer, r As Integer
- Dim shp As Shape
- Dim RegEx
- Call test0
- r = 1
- For i = 1 To 137
- '默认width是54磅,所以图片width也取54
- '默认height是13.5磅,所以图片height取其4倍
- Set shp = ActiveSheet.Shapes.AddShape(i, 0, h, 54, 54)
- With CreateObject("VBSCRIPT.REGEXP")
- .Global = True
- .Pattern = "[^\u4e00-\u9fa5]"
- Cells(r, 3) = .Replace(shp.Name, "")
- End With
- 'Cells(r, 3) = shp.Name '用作存放shape对象名称的单元格行号
- r = r + 6 '每次添加后,向下移动6行
- h = h + 81 '81是因为默认13.5磅,所以取其6倍
- Next i
- End Sub
复制代码
|
评分
-
参与人数 1 | +16 |
金币 +18 |
收起
理由
|
爱疯
| + 16 |
+ 18 |
07的话,就可以。学习了! |
查看全部评分
|