Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a crash testing
Message
De
05/07/1999 02:17:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Need a crash testing
Divers
Thread ID:
00237411
Message ID:
00237411
Vues:
36
Hello folks. I have an excel97 routine that never crashed on systems I've tried. My partners tried on other different systems and told me it crashes there. Would you pls test this very abstract of the routine. If you can get the crash pls remove the line with "release oExcel", uncomment the following "release oExcel" and try again. That line is suspected one. TIA.
Clear all
USE home()+"samples\data\orders"
WAIT window nowait "Sending data to Excel..."

lcTempExcelFile=sys(5)+curdir()+"X"+sys(2015)+".xls"
COPY to (lcTempExcelFile) type xl5	&& Copied to xls file

PUBLIC oExcel
oExcel = createobject("Excel.application")
WITH oExcel
  .workbooks.open(lcTempExcelFile) && Open saved xls

  =_JustTest(oExcel)

  .visible = .t. && Done - show
  WAIT clear
ENDWITH

Release oExcel
DECLARE integer GetForegroundWindow in WIN32API
DECLARE short IsWindow in WIN32API integer
lnExcelWindow = GetForegroundWindow()	&& Save Excel window handle
DO while IsWindow(lnExcelWindow)	# 0 && Loop while our Excel window alive
ENDDO
Clear dlls
*Release oExcel
ERASE (lcTempExcelFile)

FUNCTION _JustTest
LPARAMETERS toExcel
WITH toExcel
  .Union(.Range("A:A"),.Range("2:4"), .Range("C6:F20")).select
  .Application.Selection.Font.Name = "Wingdings"
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform