Page 1 of 1

Argument error: SWITCH

Posted: Sun Dec 09, 2007 6:43 pm
by acwoo
How to solve the following:

Application
===========
Path and name: C:\test\test1.exe (32 bits)
Size: ********* bytes
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 10/12/07, 02:10:20
Error description: Error BASE/3104 Argument error: SWITCH
Args:
[ 1] = U

Stack Calls
===========
Called from: => XLSFONT(0)
Called from: .\c13.prg => EXCELFAB(6110)
Called from: .\c13.prg => (b)EXCELFAA(6067)
Called from: .\source\function\MSGRUN.PRG => (b)MSGRUN(0)
Called from: .\source\classes\DIALOG.PRG => (b)TDIALOG(0)
Called from: => TDIALOG:DISPLAY(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\source\function\MSGRUN.PRG => MSGRUN(0)
Called from: .\c13.prg => EXCELFAA(6067)
Called from: .\c13.prg => (b)EXCELFA(6047)
Called from: => TBUTTON:CLICK(0)
Called from: => TBUTTON:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TDIALOG:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c13.prg => EXCELFA(6056)
Called from: .\c11.prg => (b)EXCELTRAN(7105)
Called from: => TWINDOW:LBUTTONDOWN(0)
Called from: => TBITMAP:LBUTTONDOWN(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TCONTROL:HANDLEEVENT(0)
Called from: => TBITMAP:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\c11.prg => EXCELTRAN(7237)
Called from: .\ec.prg => (b)BUILDMENU2(4012)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: .\test1.prg => MAIN(146)

The Code:
FUNCTION excelfab()

#include "fivewin.ch"
#include "FileXLS.ch"

#define BORDER_UP nOr( BORDER_TOP )
#define BORDER_DOWN nOr( BORDER_BOTTOM )
#DEFINE TRUE .T.
#DEFINE FALSE .F.

static oFileXLS


Local nFont1, nFont2

Local nFormat1, nFormat2,nXlsLine:=0

Public Drive:="D:\",Directory:="TempXLS",Start:="\"
lChDir("D:\")
lMkDir("TempXLS")
lChDir("TempXLS")

DEFINE XLS FONT nFont1 NAME "Arial" HEIGHT 12 BOLD <- Why Argument error: SWITCH

Please help

Posted: Sun Dec 09, 2007 7:19 pm
by Antonio Linares
Acwoo,

The error is inside XLSFONT()

Please search for SWITCH statement inside XLSFONT() source code

Why Argument error: SWITCH

Posted: Mon Dec 10, 2007 12:33 am
by acwoo
Thanks for the reply

I still can't figure out

Why Argument error: SWITCH

Please help

Posted: Mon Dec 10, 2007 12:47 am
by Antonio Linares
Acwoo,

Please post the source code of XLSFONT()

Argument error: SWITCH

Posted: Mon Dec 10, 2007 3:25 am
by acwoo
Got it fixed. Thanks