Good afternoon, I thought I should hide a "CopyButton" unless the workbook has already been saved and copied to a "_TEMP" file. But my code just results in:
"Excel 2010 Run-time error '438' Object doesn't support this property or method"
It's not such a big deal as I've put some code on the copy button but just wanted it to be a bit smarter.
How could I hide this button?
Many thanks,
D€$
"Excel 2010 Run-time error '438' Object doesn't support this property or method"
Code:
If InStr(ActiveWorkbook.Name, "_TEMP") = 0 Then
Worksheets("Control Panel").CopyButton.Visible = False
End If
It's not such a big deal as I've put some code on the copy button but just wanted it to be a bit smarter.
Code:
If InStr(ActiveWorkbook.Name, "_TEMP") = 0 Then
strPrompt = "This is the original workbook, save copy first"
strTitle = "Can't Copy Workbook"
MsgBox strPrompt, vbCritical, strTitle
Exit Sub
End If
How could I hide this button?
Many thanks,
D€$