Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
I am running a macro from a button that inserts a new row and copies the
formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
Absolutely. The button is not part of the cell but floating on a layer above
the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
is that absolutely not or absolutely? if it i possible, any idea how?
"Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
You are not giving much detail, but if the button is covering cell A10 then
code Range("A10"). Select will select the cell. Mike F "Patrick Bateman" wrote in message ... is that absolutely not or absolutely? if it i possible, any idea how? "Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
Assuming it is a forms button, and it is called myButton, then use
ActiveSheet.Buttons("myButton").TopLeftCell.Entire Row.Insert -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Patrick Bateman" wrote in message ... is that absolutely not or absolutely? if it i possible, any idea how? "Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
Bob, assuming i would have to replace "mybutton" with the name of the button
is there a way of the just using the button i have just pressed. thankyou "Bob Phillips" wrote: Assuming it is a forms button, and it is called myButton, then use ActiveSheet.Buttons("myButton").TopLeftCell.Entire Row.Insert -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Patrick Bateman" wrote in message ... is that absolutely not or absolutely? if it i possible, any idea how? "Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
If you mean in the macro assigned to the button(s)
s = Application.Caller ActiveSheet.Buttons(s).TopLeftCell.EntireRow.Inser t -- Regards, Tom Ogilvy "Patrick Bateman" wrote: Bob, assuming i would have to replace "mybutton" with the name of the button is there a way of the just using the button i have just pressed. thankyou "Bob Phillips" wrote: Assuming it is a forms button, and it is called myButton, then use ActiveSheet.Buttons("myButton").TopLeftCell.Entire Row.Insert -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Patrick Bateman" wrote in message ... is that absolutely not or absolutely? if it i possible, any idea how? "Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
selecting cell under a button
Thats done it Tom, thank you all for your help
"Tom Ogilvy" wrote: If you mean in the macro assigned to the button(s) s = Application.Caller ActiveSheet.Buttons(s).TopLeftCell.EntireRow.Inser t -- Regards, Tom Ogilvy "Patrick Bateman" wrote: Bob, assuming i would have to replace "mybutton" with the name of the button is there a way of the just using the button i have just pressed. thankyou "Bob Phillips" wrote: Assuming it is a forms button, and it is called myButton, then use ActiveSheet.Buttons("myButton").TopLeftCell.Entire Row.Insert -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Patrick Bateman" wrote in message ... is that absolutely not or absolutely? if it i possible, any idea how? "Mike Fogleman" wrote: Absolutely. The button is not part of the cell but floating on a layer above the cell. Mike F "Patrick Bateman" wrote in message ... I am running a macro from a button that inserts a new row and copies the formulas from the row above into it, but when doing this i need to specify an active cell at the point at which the new row is inseted. is it possible that i can insert code that selects the cell the button is on top of? Thankyou |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Transfer cell values to another cell by selecting button. | Excel Worksheet Functions | |||
Selecting a row relative to the position of a button | Excel Programming | |||
Selecting Button Just Activated (help!) | Excel Programming | |||
selecting more than one option button | Excel Discussion (Misc queries) | |||
Tab selecting a button with assigned macro | Excel Programming |