VBA将.bmp图像插入工作表

时间:2018-09-06 19:37:58

标签: excel vba image excel-vba

我目前正在执行一项看似简单的任务,即使用VBA将在线图片插入Excel。我在网上找到了一些示例,这些示例可用于从在线插入.jpg,但是在尝试插入下面显示的特定.bmp链接时出现“ 400”错误。 .bmp格式是否可能有问题,或者可能有超时问题?任何想法都将不胜感激。

Sub Insert_Picture()

  Dim pic As String 'file path of pic
  Dim myPicture As Picture 'embedded pic

  pic = "http://172.20.100.224/www/screenshot.bmp"

  Set myPicture = ActiveSheet.Pictures.Insert(pic)

End Sub

0 个答案:

没有答案