Can't view VBA project when moved from Windows

G

Gary Hillerson

I'm hitting a strange problem. I've got a large project that I'm
porting from Office on Windows to Office on Mac OSX.

On Windows, I open the project in the VBE, then tell it to remove
protection, so it'll be viewable without a password. If I close Word,
reopen that file, and go back into VBE, I can view the macros just
fine.

I move the file across my network to my Mac. Open it, and try to
access the macros in VBE on the Mac, and I get a Project locked for
Viewing message. Furthermore, there's no opportunity to enter a
password and view the project.

Can anyone help with this. I'm trying to debug on the mac, and can't
get to my macros to see what's going on.

Thanks in advance,
gary hillerson
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Gary:

Sorry, the Mac VBE can't handle projects that are or ever were protected in
any way. It detects the digital signature, but since it can't handle it it
falls through to a catch-all that simply disables the project.

You need to take it across to the Mac as text and re-create the project
there.

I strongly suggest that you port that project to AppleScript on the Mac.
You will find that Mac Word VBA is simply not up to the task. Ping me
offline if you need more...

Cheers


I'm hitting a strange problem. I've got a large project that I'm
porting from Office on Windows to Office on Mac OSX.

On Windows, I open the project in the VBE, then tell it to remove
protection, so it'll be viewable without a password. If I close Word,
reopen that file, and go back into VBE, I can view the macros just
fine.

I move the file across my network to my Mac. Open it, and try to
access the macros in VBE on the Mac, and I get a Project locked for
Viewing message. Furthermore, there's no opportunity to enter a
password and view the project.

Can anyone help with this. I'm trying to debug on the mac, and can't
get to my macros to see what's going on.

Thanks in advance,
gary hillerson

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
G

Gary Hillerson

It's well beyond porting to AppleScript -- a very, very large piece of
code that's taken many years to evolve into its current state. I
simply haven't the time to port it, since the main customer base is on
the PC. I'm trying to make it available on the Mac, but don't have the
resources required to put a ton of effort into that.

The worst part is that it almost works fine. Most of it works fine.
But when I hit a little hitch, i pretty much have to work on the code
on my PC, and test on the Mac. VBE on the Mac sucks!

So, if i'm reading you correctly, I can on my PC export all of the
userforms and modules (about 100 in all), create a new, unprotected
project, import them all into that project, and then copy that over to
the Mac. I'll try that in a few minutes.

thanks,
g
 
J

Jim Gordon MVP

Hi Gary,

You can password protect your project on the Mac, but you can't use a
digital signature. Signed code is not supported.

VBA on the Mac is VBE version 5. Any commands exclusive to VB 6 will not
work, but there's almost always a work-around. Active-X is Open Source
and has not been ported to the Mac, so anything that's an Active-X
control will not work unless you feel like porting Active-X (sounds like
you've already got a full plate).

The VBE on the Mac is plain-Jane. It gets the job done, but there's
nothing fancy there.

For future reference keep in mind that Microsoft has announced that VBA
is going to go away some day in the future (for Windows, but it's almost
certainly true for Mac, too). No such announcement was made concerning
AppleScript, which is why it was suggested as a VBA alternative.

If you find there's a syntax or something that you can't get to work,
search Google first but remember there are folks here who can help, too.

-Jim
 

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