View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Never used a button before

It sounds like you may be still in design mode.

If you're using xl2003 menus, there's a design mode icon on the Control toolbox
toolbar. Click that to toggle in and out of that state.

Private Sub CommandButton2_Click()
With me.range("F9")
.ColorIndex = 43
.Pattern = xlSolid
End With
End Sub

(dropping the selection.)


max wrote:

I've inserted a command button and recorded (very simple):

Private Sub CommandButton2_Click()

Range("F9").Select
With Selection.Interior
.ColorIndex = 43
.Pattern = xlSolid
End With
End Sub

When I click the button, it takes me to the VBA screen. what am I doing
wrong?


--

Dave Peterson