Alex Piotto
Board Regular
- Joined
- Jul 5, 2016
- Messages
- 82
- Office Version
- 2007
- Platform
- Windows
Hi everybody.
I am trying to change the caption of a button using a value from a cell (named PERIODO).
But i get an error like:
Runtime error 1004
Unable to set the caption property of the Button Class
Now, if i take out the last part, (& vbNewLine & "and Clear") it works...
What am i missing?
I am trying to change the caption of a button using a value from a cell (named PERIODO).
But i get an error like:
Runtime error 1004
Unable to set the caption property of the Button Class
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("PERIODO")) Is Nothing Then
Buttons("Button 1").Caption = "Save As:" & vbNewLine & Sheets("RESUMO").Range("PERIODO") & vbNewLine & "and Clear"
End If
End Sub
Now, if i take out the last part, (& vbNewLine & "and Clear") it works...
What am i missing?