LoadPicture VB function in Office:mac 2004

S

steven.allen17

I posted this article on microsoft.public.vb.winapi.graphics and received
a response indicating that I might be having a problem with the file path
specification on my Mac OS X version of VB. I tried a test and just did a
chdir and then a filedatetime on the file and then on the full path for
the file and that worked fine. So I know it is not the path spec that is
getting me in trouble. It is the LoadPicture function itself is somehow
restricted in the Teacher/Student edition of Office:mac. Can anyone verify
if this is true or not. I am an educator and my application requires being
able to load image files dynamically. Here is the original content of my
posting to the vb news group. I hope that someone reading THIS group will
see this posting and be able to give me some feedback. Thanks.

Original Posting:

I am fairly new to VB in Mac Excel 2004 or any other VB for that matter. I
have succeeded in building a gui front end to a workbook with several
worksheets and was really feeling my oats when I came to the point when I
wanted to be able to load graphics files into an Image object which I had
added to my Userform using the VB toolbar. I then proceeded to use the
properties page to manually set the picture property of the image1 object
from a "browsed" bitmap file on the disk and that worked great. But when I
tried "dynamically" loading the graphics file into the image object's
picture property using LoadPicture as mentioned in the VB help pages
within Excel I got the error message below. I used the following line in
one of the CommandButton_click routines:

Image1.Picture = LoadPicture("Macintosh HD:
Users:sjallen:Documents:stevebox.bmp")

(without the carriage return inserted by NewsWatcher-X :))

I see the following message displayed on the screen when this line of code
is executed:

Compile error:

Function or interface marked as restricted, or
the function uses an Automation type not
supported in Visual Basic

It seems that everyone uses this function so I figured I am doing
something very fundamentally dumb. By the way, this is the teacher/student
edition of Office:mac 2004.

An instructor in need :)
 
J

Jim Gordon MVP

Hi Steven,

As John pointed out, this is a known bug.

Nevertheless, it is important to report your experience to Microsoft so that
they know that this bug is being encountered often.

Please take a moment to visit this URL and send a report
http://www.microsoft.com/mac/feedback/suggestion.asp

Thanks.

-Jim

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info

Quoting from "(e-mail address removed)" <[email protected]>, in
article
(e-mail address removed)1.sherman-oaks.ca.da.uu.net, on
[DATE:
 
S

steven.allen17

Hi Jim,

Thanks for the info. Consider it done. Hope that will help.

-Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top