excel - 如何将 Excel 工作表上的图片名称转换为 VBA 变量
问题描述
在 Excel 中,我可以使用选择窗格来确定图片的名称。如何将这些名称放入 vba 层?
解决方案
我假设您正在寻找这样的东西:
Sub Test()
Dim shp As Shape
Dim shpName As String
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
shpName = shp.Name
Debug.Print shpName
End If
Next shp
End Sub
推荐阅读
- c - 'a' 代表“ch = input[c] - 'a'”中的 1 吗?
- azure - Azure 备份保留策略
- python - 如何自动查询,直到使用 python / pyodbc 关闭/杀死脚本?
- javascript - Javascript 使用 onclick 附加 div 元素需要双击
- spring - 在控制器声明之前检查会话值
- google-apps-script - Google App Script - 如果选项卡的名称不存在于另一个数组中,则删除该选项卡
- django - Django: 'User' object has no attribute 'cleaned_data'
- python - Plotting a graph from multiple pandas data frame columns
- c++ - 如何正确实现快速排序?
- makefile - 为什么 GNU make 忽略 SIGINT,但不执行以下命令?