Excel 2007 Command button

Y

Yunus

I have created inserted a Button and assinged a Macro to it.

I have tried Form Control Command Button and Active ControlX Command
Button but encounetring thr following problems...

2 questions...

The Buttons do not work when the sheet is protected. How can I overcome
this

The Form Control Button does not allow me to Colour the Button, so I
assume I have to replace it with a Active Control X Command Button, but
how do I assign a Macro to this. I dont get the option when I right
click.

Thanks
 
J

Jim Cone

A couple of suggestions first...
1. Run spell check on your composition before posting. It shows consideration.
2. Get one of John Walkenbachs "Power Programming" books to use as a reference.
An early version can be had for a couple of dollars.
They won't cover the ribbon - but few of us program the ribbon and that subject deserves a
separate book.
'---
Unlock a button's linked cell to avoid problems with sheet protection.
ActiveX controls are a completely separate animal from form control buttons and require programming
code in the sheet module.
You can insert autoshapes and make them look like almost anything and easily assign a macro to them.
Some simple examples can be seen in my "Bingo Card Variety" workbook (free)... download at the link
below.
'---
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
 
Y

Yunus

Thanks Jim,
Apologies for spelling, keyboard sticky...

How do I determine which cell is linked to the button. Is it where the
button is located, in which case it stretches 3x2 cells or is it from
the Macro? - see below
Sub Macro2()
'
' Macro2 Macro
'

'
Selection.AutoFilter
Range("A2:K2").Select
Selection.AutoFilter
ActiveSheet.Range("$A$2:$K$862").AutoFilter Field:=3, Criteria1:
="=*ac*", _
Operator:=xlAnd, Criteria2:="<>*acd*"
Range("E25").Select
End Sub
 
J

Jim Cone

I don't know where the "linked cell" comment came from - buttons don't have linked cells.
Just right-click the button and choose "Format Control" and go to the protection tab and unlock the
button.
'---
Jim Cone



"Yunus" <[email protected]>
wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top