View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
tro tro is offline
external usenet poster
 
Posts: 2
Default Application Error when using GetCommandLineA

Thats what I was afraid of. I'm using Excle 2000 and
Windows 200 Professional.
Kernel32 Version is 5.0.2195.2778.
I have tried until now Excel, Word, Access and PowerPoint
(all 2000) and it only works within Word. PowerPoint
does not show the above error message but it says that it
detect some unresolvable error and recommend to save the
current book and restart PowerPoint afterwards.

-----Original Message-----
Works fine for me in Excel 2000, Windows 2000

--
Regards,
Tom Ogilvy

"tro" wrote in

message
...
Running the following code (within EXCEL 2000) I get a
Application Error.
Code:

Public Declare Function GetCommandLineA Lib "Kernel32"

()
As String

Sub probe()
Dim s As String
s = GetCommandLineA
MsgBox s
End Sub

Error:
The instruction at "0x77e87af2" referenced memory
at "0x00190000". The memory could not be "read".

The strange thing is that using this code within Word

2000
it works perfectly well. And to carry this to extremes,

I
have a Excel file containing such code which works. But

if
I save this program via Excel under a new name, the copy
produces the same error as described above.



.