ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro stopped working (https://www.excelbanter.com/excel-discussion-misc-queries/244887-macro-stopped-working.html)

Ed Davis[_2_]

Macro stopped working
 
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

--
Thank You in Advance
Ed Davis



Ed Davis[_2_]

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


--
Thank You in Advance
Ed Davis
"Ed Davis" wrote in message
...
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

--
Thank You in Advance
Ed Davis




Otto Moehrbach[_2_]

Macro stopped working
 
What is the "Changes" macro and what does it do? Otto
"Ed Davis" wrote in message
...
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

--
Thank You in Advance
Ed Davis




Ed Davis[_2_]

Macro stopped working
 
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" wrote in message
...
What is the "Changes" macro and what does it do? Otto
"Ed Davis" wrote in message
...
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

--
Thank You in Advance
Ed Davis






Ed Davis[_2_]

Macro stopped working
 
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" wrote in message
...
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" wrote in message
...
What is the "Changes" macro and what does it do? Otto
"Ed Davis" wrote in message
...
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

--
Thank You in Advance
Ed Davis








Ed Davis[_2_]

Macro stopped working
 
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.


--
Thank You in Advance
Ed Davis
"Ed Davis" wrote in message
...
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" wrote in message
...
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" wrote in message
...
What is the "Changes" macro and what does it do? Otto
"Ed Davis" wrote in message
...
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

--
Thank You in Advance
Ed Davis











All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com