Excel 2004 VBA debugger problem

S

spacemodler

Has anyone else seen this problem, and hopefully discovered the
conflict...

Recently upgraded from Office X (and have removed all old files) to
Office 2004 (probably a bad move).

Macros appear to operate fine, but when debugging code, using break
points of single step mode use of Public variables will get divide by
zero error on any statements referencing the Public variable. This
makes it tough to debug the code.

Code sample used to understand problem

Public woof As Single

Sub bowwow()
woof = 1
Debug.Print woof
If woof >= 1 Then
' something
End If
End Sub

I suspect that this is a configuration problem under my account,
because I created a second account on my mac, everything worked fine.

Under my normal account I've deleted all of my recognizable microsoft
and excel preferences but the problem persists. One of the differences
that might be a factor between my normal and secondary account is that
I have Virtual PC, with Office XP install on the prime account, this
doesn't exist on the new account.
System: Mac OS 10.2.8, Ti G4, 667Mhz

Any thoughts or words of wisdom?
 
P

Paul Berkowitz

Has anyone else seen this problem, and hopefully discovered the
conflict...

Recently upgraded from Office X (and have removed all old files) to
Office 2004 (probably a bad move).

Macros appear to operate fine, but when debugging code, using break
points of single step mode use of Public variables will get divide by
zero error on any statements referencing the Public variable. This
makes it tough to debug the code.

Code sample used to understand problem

Public woof As Single

Sub bowwow()
woof = 1
Debug.Print woof
If woof >= 1 Then
' something
End If
End Sub

I suspect that this is a configuration problem under my account,
because I created a second account on my mac, everything worked fine.

Under my normal account I've deleted all of my recognizable microsoft
and excel preferences but the problem persists. One of the differences
that might be a factor between my normal and secondary account is that
I have Virtual PC, with Office XP install on the prime account, this
doesn't exist on the new account.
System: Mac OS 10.2.8, Ti G4, 667Mhz

Any thoughts or words of wisdom?

No problems here. If you have Excel installed in your main /Applications
folder, then there shouldn't be any differences between users due to the app
installation. It's got absolutely nothing to do with VPC - your Mac Excel
and VBA have no idea that the Windows versions are being emulated in VPC.

You may not be fully aware of all the prefs which interact here. In Office
2004, crucial prefs now include (in the ~/Library/Preferences/Microsoft/
folder)

com.microsoft.Excel.prefs.plist
com.microsoft.Office.prefs.plist
Microsoft Excel
Office Registration Cache 11
VBA Preferences


But there are others. If need be just remove the whole Microsoft subfolder
and re-launch. Also com.microsoft.Excel.plist in the Preferences folder.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
S

spacemodler

Follow-up--

I had cycled the Microsoft preferences several times, didn't fix
things, problem was in another file. Cleaned up preferences and
problem has gone away. Not sure what the actual conflict was with, all
I know is that it wasn't with any of the essential applications that I
frequently use. Maybe a corrupted file was causing me grief.

I had removed all preferences, then added back in preferences until I
had a fully functional system. Initial tried a binary approach but the
first set of preferences broke it all again, so decided to opt for
getting only the essentials in nd making sure the system worked than
findong out whay the culprit was. It now works, if it breaks again
later I'll know what it was then. I don't know what caused the mess,
but it wasn't essential to me, so it may have been an old artifact of
something else I had long ago deleted.
 

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