[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Me.Image1.Picture = LoadPicture(path & file name) --> Error 53 File not found

Posted on 2012-08-22
6
Medium Priority
?
2,345 Views
Last Modified: 2012-08-22
I attach an excel file in which I attempt to load a JPEG into a UserForm image control.
Also attached is the graphic: Note_Icon.JPEG
I get Error 53 File not found.

'Graphic details:
    'Graphic name: "Note_Icon.JPEG"
    'Graphic size from its properties box: 34.0 KB
    'Graphic location from its properties box: "C:\Users\Roger\Desktop"
Code:
Me.Image1.Picture = LoadPicture("C:\Users\Roger\Desktop\Note_Icon.JPEG")

Run active X cmd_Button on sheet 1 - to load UserForm1
Rest of code is in UserForm1.

Please can you help me?
Thanks,
Kelvin4
Import-graphic-to-UserForm-v1.xlsm
Note-Icon.JPG
0
Comment
Question by:Kelvin4
  • 3
  • 3
6 Comments
 
LVL 50

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 38321961
Are you absolutely certain that you have a path named "C:\Users\Roger\Desktop because there's nothing wrong with your code?
0
 

Author Comment

by:Kelvin4
ID: 38322057
Thanks, again
None of these scripts work:
Me.Image1.Picture = LoadPicture("C:\Users\Roger\Desktop\Note_Icon.JPEG")
Me.Image1.Picture = LoadPicture("Desktop\Note_Icon.JPEG")
Me.Image1.Picture = LoadPicture("Windows\Desktop\Note_Icon.JPEG")

Me.Image1.Picture = LoadPicture("C:\Users\Roger\Desktop\Note_Icon.JPEG") is taken from the Properties box, location value for Note_Icon.JPEG

I tried Me.Image1.Picture = LoadPicture("Desktop\Note_Icon.JPEG") as the address bar in Explorer (Windows7) only shows "Desktop"

How can I diagnose my way through this?
On the web, this error is not infrequently reported... but there again one trawls stuff up..

Kelvin
0
 
LVL 50

Expert Comment

by:Martin Liss
ID: 38322091
Try

C:\Documents and Settings\Roger\Desktop\\Note_Icon.JPEG

if in fact there is a user named 'Roger'
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 50

Expert Comment

by:Martin Liss
ID: 38322105
Otherwise do a search for it via Start|Search and use the path that you find.
0
 

Author Comment

by:Kelvin4
ID: 38322542
Ho Hum:
It is a 'JPEG image' but a .JPG file extension:
This works:
Me.Image1.Picture = LoadPicture("C:\TestImportFile to Excel\Note_Icon.JPG")

Foolish! I've yet to test out and explain some of the 'failed paths' reported (vs failed files).

Thanks
Kelvin
0
 

Author Closing Comment

by:Kelvin4
ID: 38322546
Panic over.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question