J
Jürgen Ruf
Hi,
I have written VBA code on Windows which causes an VBA run-time error
using Mac Excel 2004.
The error is caused by the following routine which is called by an
action of an button in the excel spreadsheet:
Private Sub CallFrmCountryCode()
Dim iRow As Integer
Application.ThisWorkbook.Sheets("Input").Unprotect "mtgssq"
Application.ThisWorkbook.Sheets("iso3166").Unprotect "mtgssq"
'The problem is caused with the next command
'Run-time error 1004: unable to get the buttons property of the
worksheet class
MsgBox ("Button: " &
Application.ThisWorkbook.Sheets("Input").Buttons(Application.Caller).Text)
iRow = ActiveSheet.Buttons(Application.Caller).TopLeftCell.Row
frmCountryCode.txt_Auswahl = Cells(iRow, 3)
frmCountryCode.Show
Application.ThisWorkbook.Sheets("Input").EnableOutlining = True
Application.ThisWorkbook.Sheets("Input").Protect contents:=True,
userInterfaceOnly:=True, password:="mtgssq"
Application.ThisWorkbook.Sheets("iso3166").Protect "mtgssq"
End Sub
Doesn't Mac VBA support the button object ?
Any idea ?
Best regards
Juergen
I have written VBA code on Windows which causes an VBA run-time error
using Mac Excel 2004.
The error is caused by the following routine which is called by an
action of an button in the excel spreadsheet:
Private Sub CallFrmCountryCode()
Dim iRow As Integer
Application.ThisWorkbook.Sheets("Input").Unprotect "mtgssq"
Application.ThisWorkbook.Sheets("iso3166").Unprotect "mtgssq"
'The problem is caused with the next command
'Run-time error 1004: unable to get the buttons property of the
worksheet class
MsgBox ("Button: " &
Application.ThisWorkbook.Sheets("Input").Buttons(Application.Caller).Text)
iRow = ActiveSheet.Buttons(Application.Caller).TopLeftCell.Row
frmCountryCode.txt_Auswahl = Cells(iRow, 3)
frmCountryCode.Show
Application.ThisWorkbook.Sheets("Input").EnableOutlining = True
Application.ThisWorkbook.Sheets("Input").Protect contents:=True,
userInterfaceOnly:=True, password:="mtgssq"
Application.ThisWorkbook.Sheets("iso3166").Protect "mtgssq"
End Sub
Doesn't Mac VBA support the button object ?
Any idea ?
Best regards
Juergen