ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2007 Command button (https://www.excelbanter.com/excel-discussion-misc-queries/445446-excel-2007-command-button.html)

Yunus

Excel 2007 Command button
 

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

Jim Cone[_2_]

Excel 2007 Command button
 
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





"Yunus" wrote in message
m...

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




Yunus

Excel 2007 Command button
 
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




In article ,
xx says...

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





"Yunus" wrote in message
m...

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





Jim Cone[_2_]

Excel 2007 Command button
 
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"
wrote in message
m...
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




In article ,
xx says...

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





"Yunus" wrote in message
m...

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








All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com