Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Make a cell into a Macro button


How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Make a cell into a Macro button


I'm trying to make it idiot ... errr ... Manager proof.


-----Original Message-----

How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Make a cell into a Macro button

Hi

Insert the button from Forms toolbar (it's easier to use than one from
Control Toolbox) into worksheet, assign the macro to it, place the over cell
and adjust, and set it to 'Move and Size with cells'


--
(When sending e-mail, use address )
Arvi Laanemets


"Al" <al_dempsey@hotmail wrote in message
...

How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Make a cell into a Macro button

Bad idea, I think, because
1. it is not obvious what needs to be done to trigger the
macro; the cell looks like any other cell.
2. if rows or columns are inserted, the position of
the 'button' cell changes; its address needs to be trapped-
-see below.

BUT, if you must,

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As
Range, Cancel As Boolean)
If Target.Address = "$C$3" Then abc
Cancel = True
End Sub

Sub abc()
MsgBox "Macro can run here"
End Sub

If C3 is double clicked then the macro abc will be run.


-----Original Message-----

How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Make a cell into a Macro button


Sweetness!

Thx MUCH!!


-----Original Message-----
Hi

Insert the button from Forms toolbar (it's easier to use

than one from
Control Toolbox) into worksheet, assign the macro to it,

place the over cell
and adjust, and set it to 'Move and Size with cells'


--
(When sending e-mail, use address )
Arvi Laanemets


"Al" <al_dempsey@hotmail wrote in message
...

How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Make a cell into a Macro button

Hi
This will do it on cell A1 in the active sheet

Sub MakeButton()
Dim myButton as Button

ActiveWindow.Zoom = 100 'if not, there may be an alignment problem
when date buttons are clicked
With Activesheet.Range("A1")
Set myButton = ActiveSheet.Buttons.Add (.Left, .Top, .Width,
..Height)

With myButton 'change properties as required
.Placement = xlMove
.Caption = "mytext"
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.Orientation = xlUpward
.OnAction = "myMacro"
End With 'myButton
End With ' 'Range "a1"
'Scroll to the button
Application.GoTo Reference:=Activesheet.Range("A1") _
, Scroll:=True
Set myButton = Nothing
end sub

regards
Paul
"Al" <al_dempsey@hotmail wrote in message ...
How do I turn a specfic cell into a button that when
pressed runs a specific macro?


Thx in Advance,
Al

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
button in a cell to activate a macro alexfair Excel Worksheet Functions 6 May 30th 08 03:09 PM
make a cell into a button RGlade Excel Discussion (Misc queries) 1 January 28th 08 07:35 PM
Attaching Macro to Cell instead of button? Satchmo2006 Excel Discussion (Misc queries) 2 August 29th 07 10:20 PM
Inserting a button into a cell and linking it to a macro Robb W Excel Discussion (Misc queries) 3 May 2nd 06 09:04 PM
How to make a macro run on the next cell gmoexcel Excel Discussion (Misc queries) 2 February 7th 06 08:56 PM


All times are GMT +1. The time now is 06:39 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"