![]() |
Ungültiger Variant-Operation?
Hallo zusammen,
ich erhalte eine Fehlermeldung zu diesem Abschnitt. "Ungültig Variant-Operation" Was ist hier falsch?
Delphi-Quellcode:
MfG
if ConnectToExcel = True
then begin ExcelApp.WorkBooks.Open(LoadFromIniFile('FILE', 'Neu')); ExcelApp.DisplayAlerts := False; Cursor:=crHourGlass; Application.ProcessMessages; for i:=15 to 43 do begin if ExcelApp.Range['B'+IntToStr(i), 'B'+IntToStr(i)].Value = FormatDateTime('dd.mm.yyyy', now) then begin ExcelApp.Range['G'+IntToStr(i), 'G'+IntToStr(i)].Value :=FormatDateTime('hh:nn', Time); ExcelApp.Save; ExcelApp.Quit; ExcelApp := Unassigned; end; end; Cursor:=crDefault; end else exit; schuetze09 |
Re: Ungültiger Variant-Operation?
Delphi-Quellcode:
for i:=15 to 43
do begin if ExcelApp.Range['B'+IntToStr(i), 'B'+IntToStr(i)].Value = FormatDateTime('dd.mm.yyyy', now) then begin ExcelApp.Range['G'+IntToStr(i), 'G'+IntToStr(i)].Value :=FormatDateTime('hh:nn', Time); // Falsch: die Schleife arbeitet weiter und du machst Excel zu ExcelApp.Save; ExcelApp.Quit; ExcelApp := Unassigned; // <=== !!! end; |
Re: Ungültiger Variant-Operation?
was soll ich da noch sagen, außer
DANKE Das Problem ist gelöst! MfG schuetze09 |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:07 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz