Excel2013 vba窗体程序如何通过image控件将工作表中得图片(不是本地照片)
Excel2013vba窗体程序如何通过image控件将工作表中得图片(不是本地照片)Excel2013vba窗体程序如何通过image控件将工作表中得图片(不是本地照片...
Excel2013 vba窗体程序如何通过image控件将工作表中得图片(不是本地照片)
Excel2013 vba窗体程序如何通过image控件将工作表中得图片(不是本地照片)显示窗体程序中。通过一下程序老是报错,哪位大神帮我调试一下。
Private Sub UserForm_Initialize()
Dim pic As Shape,Objpic As ChartObject
Set pic = ActiveSheet.Shapes(1)
Set Objpic = ActiveSheet.ChartObjects. Add(0,0,pic.Width,pic.Height) pic.Copy
Objpic.Chart.Paste
Objpic.Chart.Export ThisWorkbook.Path & "\A.jpg"
Imagel.Picture = LoadPicture(ThisWorkbook.Path & "\A.jpg")
Imagel.PictureSizeMode = fmPictureSizeModeStretch FileSystem.Kill ThisWorkbook.Path & "\A. jpg"
Objpic.Delete
End Sub 展开
Excel2013 vba窗体程序如何通过image控件将工作表中得图片(不是本地照片)显示窗体程序中。通过一下程序老是报错,哪位大神帮我调试一下。
Private Sub UserForm_Initialize()
Dim pic As Shape,Objpic As ChartObject
Set pic = ActiveSheet.Shapes(1)
Set Objpic = ActiveSheet.ChartObjects. Add(0,0,pic.Width,pic.Height) pic.Copy
Objpic.Chart.Paste
Objpic.Chart.Export ThisWorkbook.Path & "\A.jpg"
Imagel.Picture = LoadPicture(ThisWorkbook.Path & "\A.jpg")
Imagel.PictureSizeMode = fmPictureSizeModeStretch FileSystem.Kill ThisWorkbook.Path & "\A. jpg"
Objpic.Delete
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |