What is going on here? (macro mystery)

  • Thread starter Thread starter Mark Stephens
  • Start date Start date
M

Mark Stephens

I have an autoshape on sheet 2 of a workbook which runs some code (changes a row height, formats the row) and then actvates sheet 1.

When I click the autoshape sheet 1 is activated which tells me the macro isrunning as it is the ast line of the macro. However, when I insert a breakpoint it doesn't break!

The row which the code formats remains untouched which like the lack of break point usggests the code is not running, however it must be as the last line which selects sheet 1 is running.

In details, the code reads the cvalue of a named range on sheet 1 and then locaes the row to be reformatted by using match to find it in the first column of the sheet to be reformatted.

Even more curiously, if i richt click the authoshapes and step through the code (or just run it from within the code) it runs and executes fine!

Does anyone know what might be going on here as I don't have a clue.

If the code failed when i stepped through it then it would be a simple matter of the code having a flaw, but with it running fine when I step through it but apparently not running (well running but not doing what it should do) when I click the autoshape, quite frankly I am stumped.

Anyone have any idea what could be going on?

Thanks, Mark
 
Mark said:
I have an autoshape on sheet 2 of a workbook which runs some code (changes a row height, formats the row) and then actvates sheet 1.

When I click the autoshape sheet 1 is activated which tells me the macro is running as it is the ast line of the macro. However, when I insert a break point it doesn't break!

The row which the code formats remains untouched which like the lack of break point usggests the code is not running, however it must be as the last line which selects sheet 1 is running.

In details, the code reads the cvalue of a named range on sheet 1 and then locaes the row to be reformatted by using match to find it in the first column of the sheet to be reformatted.

Even more curiously, if i richt click the authoshapes and step through the code (or just run it from within the code) it runs and executes fine!

Does anyone know what might be going on here as I don't have a clue.

If the code failed when i stepped through it then it would be a simple matter of the code having a flaw, but with it running fine when I step through it but apparently not running (well running but not doing what it should do) when I click the autoshape, quite frankly I am stumped.

Anyone have any idea what could be going on?

Thanks, Mark


put on error goto in that procedure and see if it catches any error.

it happens where exception is not handled in event procedure.
 
I have an autoshape on sheet 2 of a workbook which runs some code (changes a row height, formats the row) and then actvates sheet 1.



When I click the autoshape sheet 1 is activated which tells me the macro is running as it is the ast line of the macro. However, when I insert a break point it doesn't break!



The row which the code formats remains untouched which like the lack of break point usggests the code is not running, however it must be as the lastline which selects sheet 1 is running.



In details, the code reads the cvalue of a named range on sheet 1 and then locaes the row to be reformatted by using match to find it in the first column of the sheet to be reformatted.



Even more curiously, if i richt click the authoshapes and step through the code (or just run it from within the code) it runs and executes fine!



Does anyone know what might be going on here as I don't have a clue.



If the code failed when i stepped through it then it would be a simple matter of the code having a flaw, but with it running fine when I step through it but apparently not running (well running but not doing what it should do) when I click the autoshape, quite frankly I am stumped.



Anyone have any idea what could be going on?



Thanks, Mark
 
put on error goto in that procedure and see if it catches any error.



it happens where exception is not handled in event procedure.

Thanks for that, in actual fact I solved it, i had a hyperlink on the autoshape which apparently negates the macro, I removed it and it runs fine now.
 
Back
Top