I have a command button on a worksheet (not on a UserForm). It is a save button, and it used to be simply enabled/disabled depending on whether it was eligible for use.

It has been discovered, however, the folks are not using the save button. Rather then are saving their spreadsheets using the build-in Excel Save functions. The problem is that my button does more than just save their work. It also takes pieces of information off of their spreadsheet and puts it on a summary spreadsheet that goes to management in the form of a report. There in lies the problem when they do not use my save button.

So, one suggestion was to make it really big and change the back/fore colors on it to make it standout. I did that, and here is the resulting code.
vb Code:
  1. With cmdSaveHFR
  2.     .Enabled = True
  3.     .BackColor = vbRed
  4.     .ForeColor = vbYellow
  5.     .Height = 43.5
  6.     .Left = 8.25
  7.     .Top = 178.5
  8.     .Width = 108.5
  9.     .Caption = "Click ME To Save HFR To Disc And To Update HFR Dbase File"
  10. End With
  11.  
  12. 'this puts it back to normal
  13.  
  14. With cmdSaveHFR
  15.      .Enabled = False
  16.      .BackColor = &HE0E0E0
  17.      .ForeColor = &HC00000
  18.      .Height = 19.5
  19.      .Left = 8.25
  20.      .Top = 189.75
  21.      .Width = 108.75
  22.      .Caption = "Save HFR"
  23. End With
This works just fine until I set the spreadsheet with the button on it to "Shared" - when it is shared, and it must be shared as it is a menu type spreadsheet used by several different people in three different departments, my button sizing code generates a 1004 error, Unable to set the Height property of the OLEObject Class (if I comment out .Height =, then it will go right through the .Left .Top and .Width properties with this same error.)

So, my question is why can I change the buttons height, left, top and width when the workbook is NOT "Shared", but get an OLEObject error when attempting to make the same change when the workbook is "Shared"?