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