#1   Report Post  
 
Posts: n/a
Default Cell as Button

I can add a button to my sheet, but it seems to float over the cells.
Can I add a button so that it is in a cell? Or, alternatively, change
a cell so that it looks and behaves like a button?

Thanks

  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Keyser,

Presumably, you want clicking the cell to activate some macro code. You can
use the Selection_Change event to make any cell act as a button. This goes
in a sheet module:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("MyRange"), Target) Is Nothing Then
''' put your code here, or a call to it.
End If
End Sub

The best you can do to make it look like a button is Format - Cells -
Borders, and Fill colors and patterns. It won't be real obvious to the user
that it's a button. I generally put a real button inside the cell (assigned
to the macro), and label it in the cell.
--
Earl Kiosterud
www.smokeylake.com

wrote in message
oups.com...
I can add a button to my sheet, but it seems to float over the cells.
Can I add a button so that it is in a cell? Or, alternatively, change
a cell so that it looks and behaves like a button?

Thanks



  #3   Report Post  
 
Posts: n/a
Default

I generally put a real button inside the cell (assigned
to the macro), and label it in the cell.

How do I accomlish this?

  #4   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Keyser,

Take a look at "Consolidated Filtered table with sort.xls" at
http://www.smokeylake.com/excel/excel_truths.htm. There are buttons in the
heading that run sort macros.
--
Earl Kiosterud
www.smokeylake.com

wrote in message
oups.com...
I generally put a real button inside the cell (assigned

to the macro), and label it in the cell.

How do I accomlish this?



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
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
Using a button in a cell DaveSunsation Excel Worksheet Functions 2 December 1st 04 04:02 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:22 AM.

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"