Real and curious problems with vba office2000 et office2003 on a computer

P

PW

Since some days, I have some problems with VBA (with Access as well as
Word).
All these problems exist in Office 2000 as well as in 2003

Some VBA functions do not vork anymore.
==========================================================
So the function 'Kill' is completly unefficient. I mean that 'Kill' doesn't
kill files, but, worse, give no error message if I ask to 'Kill' a file
which does not exists (for example with a bad path).
So the line :
-----------
Kill "c:\program files\internet explorer\iexplore.exe"
-----------
does not give a message. Just the program quit the function where is the
line without executing the lines after.
There is no error treatment un function.
If I put a Rem or a "'" at the begining of the line, the lines after are
executed.
If the path of the program to kill is bad (for example "c:\progr
files\internet explorer\iexplore.exe" , there is no error message!
==========================================================
The function 'Mkdir' does not work anymore.
So the line :
-----------
MkDir "c:\xxxxx"
-----------
doen't create the dirextory 'xxxxx'.
==========================================================
The procedure :
-----------
Sub Test ()
Dim FileNumber as integer
FileNumber = FreeFile
Open "c:\TEST" For Output As #FileNumber
Write #FileNumber, "Ceci est un exemple"
Close #FileNumber
End Sub
-----------
does'nt create the file and the error message says that the file does not
exist !
It do not accept to create it...
==========================================================
The function 'Shell' does not work anymore.
So the line
-----------
Shell "c:\program files\internet explorer\iexplore.exe", vbMaximizedFocus
-----------
does'nt launch Internet Explorer.
If the path given in string is bad, there is no error message.
==========================================================
I don't know if the following problem is bound to there others problems, but
now I cannot use the function "Export in Word" or "Export in Excel" or
"Export in 'presse-papier'" for exportations of preview of report.
No problem if I export to Word a preview of a form or of a table or of a
query.
But it is now impossible to export a report preview towards Word.
===========================================================
I have Windows XP PRO.
I have Office 2000 developer, and Office 2003.
All these problems can be observed VBA 2000 AND VBA 2003 (in Accesss 2003).
============================================================
I have uninstalled and reinstalled twice both Office 2003 and Office 2000.
No results.
============================================================
On my second computer, all is good.
To replace filesystem functions I use 'Scripting.FileSystemObject', which
works PERFECTLY.
============================================================
The functions that does not work on my pricipal computer work on the second
computer.
Which can be ABOVE VBA in the first computer which can cause this kind of
problems ?
HOW CAN I REPLACE the 'Shell' function ?

Thanks for responses. And excuses for my english. I am french...
 
C

Cindy M -WordMVP-

Hi Pw,
Since some days, I have some problems with VBA (with Access as well as
Word).
All these problems exist in Office 2000 as well as in 2003
...
The functions that does not work on my pricipal computer work on the second
computer.
Which can be ABOVE VBA in the first computer which can cause this kind of
problems ?
this is happening on only the one machine, if I understand you correctly?

My first thought would be to check that you still have active and valid
references in the VB Editor, Tools/References, to the Visual Basic for
Applications library.

The other thing that occurs to me is that something may have damaged, or
unregistered, the necessary library files. From with Word 2003, you could try
Help/Detect and Repair. Otherwise, I'd try uninstalling both versions of
Office (in the reverse order in which you installed them), then reinstall ONE
of them and see if the functionality has returned.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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