in reply to Re: Using Win32::OLE and Excel - Tips and Tricks

This exception
OLE exception from "Microsoft Office Excel" 'SLOC_Count_C_Sharp_Macro' could not be found. Check the spelling of the file name, and verify the file location is correct tells me that the string
"Personal.xls!SLOC_Count_C_Sharp_Macro" is not meaningful to Win32::OLE, or is simply incorrect.

I'm not sure that win32::ole allows you to run a macro from a workbook that you haven't opened. Have you tried this:

my $macroExcel = Win32::OLE::Strict->new('Excel.Application') or die; my $macroBook = $macroExcel->Workbooks->open($myPersonalMacros) or die +; $macroExcel->run("SLOC_Count_C_Sharp_Macro");

And please, please, read How do I compose an effective node title?, How do I post a question effectively?, and Markup in the Monastery!