楼上这一步已做到.多谢大家.现在的问题是我要在一个格子里面写入 =showimg. showimg 只能是函数,但是又不能执行函数中的 public function showimg ActiveSheet.Pictures.Insert("C:\temp.bmp").Select end function 提示是:Unable to get the Insert property of the pictures class.如果我把showimg写成过程又不能用 =showimg这样调用,因为它没有返回值.请高手帮忙!!!!!
就像 =FucPic(ControlNo) 是一个单元格的值.
ControlNo是一个查询图片的关键字.
然后就实现输出图片.
还请赐教.
是不是没有办法呢?非常感谢TechnoFantasy(冰儿马甲www.applevb.com),但是因为把它存为本地文件可能不太现实,所以还请给点其他的方法.谢谢!!
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\Administrator\My Documents\My Pictures\140850_14770.jpg" _
).Select
两个语句就搞定(在Excel中,如果在VB中只需要增加一些打开文档的语句就可以了)
不可能通过函数FucPic实现吗?
http://office.microsoft.com/assistance/preview.aspx?AssetID=HA010548462052&CTT=3&Origin=HP051984252052&Client=1
showimg 只能是函数,但是又不能执行函数中的
public function showimg
ActiveSheet.Pictures.Insert("C:\temp.bmp").Select
end function
提示是:Unable to get the Insert property of the pictures class.如果我把showimg写成过程又不能用 =showimg这样调用,因为它没有返回值.请高手帮忙!!!!!