LoadPicture VB function in Office:mac 2004

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: steven.allen17_at_gte.net (steven.allen17_at_verizon.net)
Date: 06/29/04


Date: Tue, 29 Jun 2004 16:35:36 GMT

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 :-)



Relevant Pages

  • LoadPicture function appears restricted in Office:mac
    ... see this posting and be able to give me some feedback. ... I am fairly new to VB in Mac Excel 2004 or any other VB for that matter. ... wanted to be able to load graphics files into an Image object which I had ... properties page to manually set the picture property of the image1 object ...
    (microsoft.public.mac.otherproducts)
  • [opensuse] Linux in Public Schools
    ... I also work as a technical support person in an educational setting that is ... firmly locks the sytem to MS (or Mac). ... for a good posting about it. ...
    (SuSE)
  • Re: [opensuse] Linux in Public Schools
    ... I also work as a technical support person in an educational setting ... firmly locks the sytem to MS (or Mac). ... PS I am still a novice in my pursuit of understanding and using linux - ... for a good posting about it. ...
    (SuSE)
  • Re: Looking at Macs from a PC users perspective
    ... > posting, could you point out where my assumption of a successful procedure ... If that really old Mac is stolen or damaged, ... special printers FOR PCs AND WINDOWS ONLY, ... "Workable" plastic models can often be produced. ...
    (comp.sys.mac.advocacy)
  • Re: The grass is greener
    ... I've tried doing a bit of posting in COLA, ... posts -- mostly free software fanatics so intolerant in their ideology ... I'm mostly posting in the Mac and Battlefront forums, ...
    (comp.sys.mac.advocacy)