hi
i've got a combbox with two options for dropdown and a macro that executes dependeing ont he two options..
the vba for the combbox on the worksheet is:
Private Sub combo_pl1_Change()
ActiveSheet.Unprotect ("pass")
Select Case combo_pl1.Value
Case "Plus or Minus 0%"
Call non2020pl_rev0percent
Case "Plus or Minus 1000%"
Call non2020pl_rev1000percent
Case Else
MsgBox "Something Else"
End Select
ActiveSheet.Protect ("pass")
End Sub
-----------------
While the macro for the first macro referred to above in the combobbox is below:
---------------
' Revenue
Sub non2020pl_rev0percent()
ActiveSheet.Unprotect ("escondida")
Range("EF6").Select
ActiveCell.FormulaR1C1 = "0"
Range("EK6").Select
ActiveCell.FormulaR1C1 = "0"
ActiveSheet.Protect ("escondida")
End Sub
-----------------------
I have two issues:
Everytime i use the dropdown box, it works, but than after i go and save a different version of the file (different file name), i get error message:
Unprotect method in worksheet failed.... (this error occurs when i use these dropdown boxes before i save), when i do anythign else to my spreadsheet, and save a differnt name file, it doesn't throw this error.
...
it will still save, after you ok it,
but when you go back to use it, with the different name, the error that there is a RC notation ...
so 2nd question is: why does it change my formulae (the 2nd vba code above) into RC notation?
i've got a combbox with two options for dropdown and a macro that executes dependeing ont he two options..
the vba for the combbox on the worksheet is:
Private Sub combo_pl1_Change()
ActiveSheet.Unprotect ("pass")
Select Case combo_pl1.Value
Case "Plus or Minus 0%"
Call non2020pl_rev0percent
Case "Plus or Minus 1000%"
Call non2020pl_rev1000percent
Case Else
MsgBox "Something Else"
End Select
ActiveSheet.Protect ("pass")
End Sub
-----------------
While the macro for the first macro referred to above in the combobbox is below:
---------------
' Revenue
Sub non2020pl_rev0percent()
ActiveSheet.Unprotect ("escondida")
Range("EF6").Select
ActiveCell.FormulaR1C1 = "0"
Range("EK6").Select
ActiveCell.FormulaR1C1 = "0"
ActiveSheet.Protect ("escondida")
End Sub
-----------------------
I have two issues:
Everytime i use the dropdown box, it works, but than after i go and save a different version of the file (different file name), i get error message:
Unprotect method in worksheet failed.... (this error occurs when i use these dropdown boxes before i save), when i do anythign else to my spreadsheet, and save a differnt name file, it doesn't throw this error.
...
it will still save, after you ok it,
but when you go back to use it, with the different name, the error that there is a RC notation ...
so 2nd question is: why does it change my formulae (the 2nd vba code above) into RC notation?