View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Command Button Problem

Hi,

I should have added that you can't hide all sheets in a workbook you must
leave at least one sheet visible and I assume you are doing this with the
sheet that has these buttons on.

Mike

"albertmb" wrote:

Hi everyone, can you please help me on this problem.

I have a multi sheet document and not to create confusion I hid all sheets
and assigned a command button to each sheet to unhide. All worked fine up to
Button 9, but when it came to button 10 I got this error:

"Ambiguos name detected: CommandButton10_Click()".

The Sub is as follows:

Private Sub CommandButton10_Click()
Sheets("Cost Lm").Visible = True
Sheets("Cost Lm").Select
End Sub

Thank You
Albert