Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tro tro is offline
external usenet poster
 
Posts: 2
Default Application Error when using GetCommandLineA

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Application Error when using GetCommandLineA

Initialize the string first.

Dim s As String
s = String(255, " ")
s = GetCommandLineA
MsgBox s


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Application Error when using GetCommandLineA

Thanks for the Tip, but unfortunately it does not work. I
still get the same Error.

-----Original Message-----
Initialize the string first.

Dim s As String
s = String(255, " ")
s = GetCommandLineA
MsgBox s


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"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.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Application Error when using GetCommandLineA

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.



  #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.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application error Visual basic code not shown in excel New Users to Excel 1 September 9th 08 05:59 PM
application error hahn Excel Discussion (Misc queries) 0 October 15th 07 09:29 PM
Application Defined error David P. Excel Discussion (Misc queries) 3 April 22nd 07 01:39 AM
Compile error in my Application elloss Excel Discussion (Misc queries) 1 February 20th 06 02:24 PM
Open Application Error? Emile Ianni Setting up and Configuration of Excel 1 October 12th 05 03:34 PM


All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"