sachin_p_ganjare has asked for the wisdom of the Perl Monks concerning the following question:
I am inserting a macro in a particular column, across three different worksheets in excel workbook. This is being done in a loop. In first sheet all the macros are inserted properly, but for next sheets, only few of the cells gets updated with macro.
The strange thing is when I debug the same program with stepwise execution, everything is disturbingly fine.
Monks please help.
UPDATES!!! The code bit
$active_cell->{FormulaR1C1} = $my_macro_expression; $active_cell->Select; $active_cell->Copy; $Sheet->Range($active_cell, $end_cell)->Select; $Sheet->Paste
UPDATES!!! The solution
while using different worksheets, script was not activating them before writting formula. Thats it.UPDATES!!! Solution leads to another question
How the hell script was working fine in debugging mode without worksheet activation command????
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel Macro Writting Issue
by roboticus (Chancellor) on Aug 24, 2010 at 20:39 UTC | |
|
Re: Excel Macro Writing Issue
by davies (Monsignor) on Aug 24, 2010 at 22:54 UTC | |
|
Re: Excel Macro Writting Issue
by dasgar (Priest) on Aug 25, 2010 at 04:20 UTC | |
by sachin_p_ganjare (Initiate) on Aug 25, 2010 at 05:31 UTC | |
by dasgar (Priest) on Aug 26, 2010 at 03:50 UTC |