Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all
I used following code Image3.Picture = LoadPicture("TempVB.gif") in a UserForm-Object. It worked withoug the pathname, since the file was in the path of where the excel file is saved. Now I programmed something similar like: UserForm1.Image3.Picture = LoadPicture("TempVB.gif") in a Worksheet. In this case it does not work without the pathname. Does anyone know why and if so does anyone know what I can do about it because I want this programm to be flexible enough to find the picture file in whichever folder the excel file and the picture file are saved. Thanks Philipp |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, it the picture file is not in the default path's searched by excel, it
will not search the drive to find the picture. Also, if using the image control in the worksheet, why do you preface it with Userform1? Unless you need to use the events of the image control, you could put the picture directly on the sheet with ActiveSheet.Pictures.Insert sPath & "\TempVB.gif" Regards, Tom Ogilvy "Philipp Schramek" wrote in message ... Dear all I used following code Image3.Picture = LoadPicture("TempVB.gif") in a UserForm-Object. It worked withoug the pathname, since the file was in the path of where the excel file is saved. Now I programmed something similar like: UserForm1.Image3.Picture = LoadPicture("TempVB.gif") in a Worksheet. In this case it does not work without the pathname. Does anyone know why and if so does anyone know what I can do about it because I want this programm to be flexible enough to find the picture file in whichever folder the excel file and the picture file are saved. Thanks Philipp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup dynamic pathname | Excel Discussion (Misc queries) | |||
How do I display the pathname/address of a hyperlink? | Excel Worksheet Functions | |||
Using a dynamic pathname in VLOOKUP | Excel Worksheet Functions | |||
Using a variable to represent the pathname in a formula | Excel Discussion (Misc queries) | |||
Full Pathname in Titlebar | Setting up and Configuration of Excel |