Script Crashes MS

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Script Crashes MS

Post by fightcancer » Fri May 22, 2009 10:19 pm

This script crashes MS 9.2.01. When I debug I get "Stack overflow." after the "Message>" line executes.

Code: Select all

Let>k=1

// Separate the worksheet name from the path with a colon.
Let>ExcelFilePath=D:\Saves\Games\WoW\myWoW.xls:My Markets
Let>NameItem1=Abyss Crystal
Let>CellItem1=R2C3

GoSub>GetPrices
Concat>NameItem,k

Message>wtB %NameItem% %ExcelResult%g

// Get my prices from Excel which must already be open.
SRT>GetPrices
  DDERequest>Excel,%ExcelFilePath%,Item%k%,ExcelResult,5

    // ERROR CHECKING
	IF>ExcelResult=DDE_TIMEOUT
	  MessageModal>DDEReq result = %ExcelResult%
	  Goto>MacroEnd
	ENDIF

  // Remove the "Return" that Excel typically appends to the data.
  StringReplace>ExcelResult,CRLF,,ExcelResult

END>GetPrices
While I have no doubts I'm doing something wrong, why doesn't MS spit out some error rather than closing entirely? And yes I could upgrade, but on a trial basis only.

EDIT: Now the Watch List will not display no matter what I try. Sigh... Going to try the new version.

EDIT: 11.1.10e also crashes MS, but I love the new layout, text colors, loop markers, etc. At least Show Watch List works now.

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Invalid cell? VBEVAL works well.

Post by gdyvig » Fri May 22, 2009 10:58 pm

Hi,

It does not appear to me that Item%k% expands to a RC cell location. Put MessageModal> in front of your DDEREQUEST to see what your request is expanding to.

Try the Trace method of running your script, that always displays the watchlist for me.


I use VBEVAL for Excel, it works quite well.


Gale

fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Post by fightcancer » Sat May 23, 2009 1:58 am

Yeah, that's what was causing the macro to fail. Still, I wish MS would give an error message or something to work with. Thanks.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts