Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default LoadPicture Pathname or no Pathname

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default LoadPicture Pathname or no Pathname

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup dynamic pathname mdhodgson Excel Discussion (Misc queries) 3 September 5th 08 03:27 AM
How do I display the pathname/address of a hyperlink? DMAnalyst Excel Worksheet Functions 8 August 10th 07 08:12 PM
Using a dynamic pathname in VLOOKUP Mike D[_2_] Excel Worksheet Functions 7 July 16th 07 09:35 PM
Using a variable to represent the pathname in a formula David Jones Excel Discussion (Misc queries) 5 November 24th 06 05:37 AM
Full Pathname in Titlebar Greg Setting up and Configuration of Excel 3 March 25th 05 02:49 AM


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"