I have a problem in my macro, i don't get it how to access or to get the properties of a command button to another command button in Calc this.
Yes in Dialog i can get properties the other command button but in Calc, it make me .
I want to access the other command button because i want to change the label on it using other button.
Case:
I have one PUSH BUTTON in Sheet1 and one PUSH BUTTON in Sheet2 now in Macro using PUSH BUTTON in Sheet2 i want to access the PUSH BUTTON in Sheet1 so just i can change the Label on it.
Code in PUSH BUTTON in Sheet1
Code: Select all
Sub Datas(Event as Object)
Dim Form As Object
'Dim sMessage
'Dim sProceed
'Dim sDialogType
Form = Event.Source.Model.Parent
btn_item1 = Form.getByName("btn_request")
End Sub
Code in PUSH BUTTON in Sheet2
Code: Select all
Sub delete_item1
sheet1 = ThisComponent.Sheets.getByName("Sheet1")
borrowerform = ThisComponent.Sheets.getByName("borrower's form")
'btn_item = Form.getByName("btn_request") '
End Sub