Hi Folks, I'm having trouble with code that I've done hundreds of times before, but which in this case is causing the error "Can't call method "Select" on an undefined value".
Here is a snippet of code: my $excel_app = Win32::OLE->new('Excel.Application') or die "could not create excel app\n"; $excel_app->{'Visible'} = 1; # " $Excel_CSAA_Test_Retrieve " is pointing to a file in the current directory... my $excel_Retrieve_Workbook = $excel_app->Workbooks->Add( { Template => $Excel_CSAA_Test_Retrieve } ) or die "could not open $Excel_CSAA_Test_Retrieve\n"; my $Sheet1 = $excel_Retrieve_Workbook->Worksheets(1); $Sheet1->Activate(); $excel_Retrieve_Workbook->ActiveSheet->Range("A4")->Select(); print "\nExiting for test\n"; exit; # *************************************************** I get the error " "Can't call method "Select" on an undefined value" on the line: $excel_Retrieve_Workbook->ActiveSheet->Range("A4")->Select(); # **************************************************** I don't understand what I'm doing wrong. I've done things similar to this many times. Can anyone see any problems with the above code??? Thanks in advance for any help. Glen Plantz Mitchell International San Diego, California
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs