Macro stopped working

E

Ed Davis

This just part of a macro that has been working for months.
All of a sudden it stopped.
Get gets to
..Locked=True
and then just stops, it never gets to the next line.
The only thing I have done was add conditional formatting to some cells.

Dim strSH As String
Dim Var As String
Var = "After_P_Change"
strSH = ActiveSheet.Name
Call Changes(Var)
ActiveSheet.Unprotect Password:="7135"
With Range("G12:H51,P40:Q44,P48:Q60,Q13:Q15,Q17")
.Locked = True
.FormulaHidden = False
MsgBox "Got to call changes"
End With
 
E

Ed Davis

It turns out that it was the conditional formatting so had to remove it.
Why would conditional formatting stop a macro from running?
 
E

Ed Davis

No changes to the macro. Just conditional formatting.
The macro Hides columns and rows.

The conditional formatting was If the cell does not contain a formulas
(derived from udf) format.
The macro never got to the line where it says formulahidden.


--
Thank You in Advance
Ed Davis
Otto Moehrbach said:
What is the "Changes" macro and what does it do? Otto
 
E

Ed Davis

I think it has something to do with the hidden. This is the whole macro and
I commented out some of it where it stopped working but still will not go on
after the locked statement.

Dim strSH As String
Dim Var As String
Var = "After_P_Change"
strSH = ActiveSheet.Name
Call Changes(Var)
ActiveSheet.Unprotect Password:="7135"
With Range("G12:H51,P40:Q44,P48:Q60,Q13:Q15,Q17")
.Locked = True
' .FormulaHidden = False
' End With
Rows("64:200").Hidden = False
Columns("B:F").Hidden = False
Columns("G:I").Hidden = True
Columns("J:O").Hidden = False
Columns("P:S").Hidden = True
ActiveSheet.Protect Password:="7135"
Range("A1").Select
Call Top_Left

--
Thank You in Advance
Ed Davis
Ed Davis said:
No changes to the macro. Just conditional formatting.
The macro Hides columns and rows.

The conditional formatting was If the cell does not contain a formulas
(derived from udf) format.
The macro never got to the line where it says formulahidden.
 
E

Ed Davis

After further review I find that all my macros that have the word hidden in
them stop at the line just before the word hidden.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top