Nz function hangs Word 2K VBA

T

Todd Lemen

I have a VBA macro that hangs when running the Nz function
under Word 2000. The same macro in the same file running
under Office XP's and Office 2003's referenced libraries
runs fine. Was the Nz function moved between 2K and later
versions?
 
P

Perry

In Office 2K the Nz function is part of the Access application object.
There are no changes in parameter settings either
(value, [valueifnull]) is still applicable in Office System

Something else must be bugging you.

Perhaps you could elaborate some more on system settings
ms office settings or relavant snippets of code.

Krgrds,
Perry
 
T

Todd Lemen

Sure.
Referenced libraries are:
Visual Basic for Applications
MS Word 9.0 Object Library
OLE Automation
Normal
MS Office 9.0 Object Library
MS Forms 2.0 Object Library
MS Access 9.0 Object Library
MS ActiveX Data Objects 2.5 Library

When running under XP or 2003, the 9.0 object libraries
are, of course, replaced with 10.0 or 11.0.

A code snippet:
With MailFields
dteReceived = Nz(!DateReceived, Date)
strName = Nz(!EmailName, "Not")
strFirstName = Nz(!FirstName, "Not")
End With

MailFields is the name of a form. When running the 9.0
object libraries, the code hangs on the first encountered
Nz function. This occurs on all machines. When running
the 10.0 or 11.0 object libraries, this code runs fine.

Interestingly enough, when I run the Nz function in Access
2000, it seems to run fine. Very strange... I would
assume it is an installation error or corrupt library,
except that the same thing occurs on more than one
machine...

TL
-----Original Message-----
In Office 2K the Nz function is part of the Access application object.
There are no changes in parameter settings either
(value, [valueifnull]) is still applicable in Office System

Something else must be bugging you.

Perhaps you could elaborate some more on system settings
ms office settings or relavant snippets of code.

Krgrds,
Perry

I have a VBA macro that hangs when running the Nz function
under Word 2000. The same macro in the same file running
under Office XP's and Office 2003's referenced libraries
runs fine. Was the Nz function moved between 2K and later
versions?


.
 

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