Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button in Excel 2007 Chart Gee Excel Programming 3 March 9th 10 07:24 PM
change the command button backcolor in Excel 2007? fisch4bill Excel Programming 2 November 5th 09 03:30 PM
What is the VBA for the Excel 2007 "Switch Window" command button? ND Pard Excel Programming 6 March 4th 09 10:39 PM
Command Button Excel 2007 dhstein Excel Discussion (Misc queries) 4 February 15th 09 04:14 PM
I can't find the command button control object in Excel 2007 Raas Excel Discussion (Misc queries) 4 April 2nd 07 03:46 PM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"