Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 通过引用文件路径设置用户窗体中图像控件的值_Excel_Vba_Userform - Fatal编程技术网

Excel 通过引用文件路径设置用户窗体中图像控件的值

Excel 通过引用文件路径设置用户窗体中图像控件的值,excel,vba,userform,Excel,Vba,Userform,为了避免必须将图像存储在工作簿本身中,或者首先将图像加载到工作簿中,然后从userform引用这些图像,是否有方法将userformimage控件中的图像值设置为特定的文件路径 比如: image_server.show set image_server.image_control_name = "C:\Users\user_name\Desktop\images\island.jpg" 显然,这很简单: image_server.Picture = LoadPicture(filepath)

为了避免必须将图像存储在工作簿本身中,或者首先将图像加载到工作簿中,然后从userform引用这些图像,是否有方法将userform
image
控件中的图像值设置为特定的文件路径

比如:

image_server.show
set image_server.image_control_name = "C:\Users\user_name\Desktop\images\island.jpg"

显然,这很简单:

image_server.Picture = LoadPicture(filepath)