Crash on trying to read a macro text

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
Guest
Posts: 83
Joined: Tue Aug 16, 2005 6:08 pm

Crash on trying to read a macro text

Post by Guest »

Hello,
Somewhat frustrated: The following code worked with the demo version of XLSReadWrite 3.0, but not with the registered version:

procedure TForm1.Button1Click(Sender: TObject);
var sString: string;
begin
XLSf.VBA.EditVBA := True;
XLSf.Filename:='c:\AHA Timesheet 2007.xls';
XLSf.Read;
with XLSf.VBA.ModuleByName('Module4') do begin
sString:=Source.Text;
ShowMessage(sString);
end;
end;

It crashes with an access violation on sString:=source.text;
Module4 exists. Delphi 2006

Jon
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

Can you please send me the excel file?


Lars Arvidsson
Post Reply