|
楼主 |
发表于 2024-1-12 09:44
|
显示全部楼层
继续学习
- Sub ll1()
-
- Dim Sht As Worksheet
- Set Sht = Sheet1
- Debug.Print Sht.Name, ActiveSheet.Name
- Sht.Activate
-
- ActiveSheet.Image1.Picture = LoadPicture("F:\SpecialSubject\GongbeiCommunity\YingbinCommunity\IMG_20231120_082639688.jpg")
- Stop
- Stop
- 'ActiveSheet.Image1.Picture = LoadPicture(ThisWorkbook.Path & "\123.jpg")
- ActiveSheet.Image1.Picture = LoadPicture("F:\SpecialSubject\GongbeiCommunity\YingbinCommunity\IMG_20231120_082639688.jpg")
- Stop
- Stop
- Dim Shp As Shape, Shps As Shapes
- Set Shps = Sht.Shapes
- Set Shp = Shps("Image1")
- Debug.Print Shp.Name, Shp.Type
- Image1.Picture = LoadPicture(ThisWorkbook.Path & "\123.jpg")
- Image1.Picture = LoadPicture("F:\A.jpg")
- End Sub
复制代码
ActiveSheet.Image.Picture成立, Sht.Image1.Picture不成立。
ActiveSheet.Image1.Picture = LoadPicture("F:\SpecialSubject\GongbeiCommunity\YingbinCommunity\IMG_20231120_082639688.jpg")
|
|