Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
user's position of cursor influences macro
Novice macro user needs help. I have a spreadsheet in which I want my user
to intitiate a macro that inserts or deletes rows based on where she positions the cursor. So, say the user wishes to insert a line above b12. She positions the cursor on b12 and calls for the macro. How do I program the macro to accept the user's positioning of the cursor to insert the rows above the cursor's position? Thanks for sharing your knowledge. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
user's position of cursor influences macro
activecell.EntireRow.Insert
-- Regards, Tom Ogilvy "pda" wrote: Novice macro user needs help. I have a spreadsheet in which I want my user to intitiate a macro that inserts or deletes rows based on where she positions the cursor. So, say the user wishes to insert a line above b12. She positions the cursor on b12 and calls for the macro. How do I program the macro to accept the user's positioning of the cursor to insert the rows above the cursor's position? Thanks for sharing your knowledge. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
user's position of cursor influences macro
Very cool. Thanks. But can I bother you for your assistance with a further
refinement? I'd also like to select the row below, copy and insert the selection, and then clear the contents in the original rows of the second and subsequent columns (leaving a formula undisturbed in column A). Is it possible? "Tom Ogilvy" wrote: activecell.EntireRow.Insert -- Regards, Tom Ogilvy "pda" wrote: Novice macro user needs help. I have a spreadsheet in which I want my user to intitiate a macro that inserts or deletes rows based on where she positions the cursor. So, say the user wishes to insert a line above b12. She positions the cursor on b12 and calls for the macro. How do I program the macro to accept the user's positioning of the cursor to insert the rows above the cursor's position? Thanks for sharing your knowledge. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
user's position of cursor influences macro
Sub abc()
ActiveCell.EntireRow.Insert ActiveCell.EntireRow.Offset(1, 0).Copy ActiveCell.EntireRow Cells(ActiveCell.Row + 1, 2).Resize(1, 255).ClearContents End Sub -- Regards, Tom Ogilvy "pda" wrote in message ... Very cool. Thanks. But can I bother you for your assistance with a further refinement? I'd also like to select the row below, copy and insert the selection, and then clear the contents in the original rows of the second and subsequent columns (leaving a formula undisturbed in column A). Is it possible? "Tom Ogilvy" wrote: activecell.EntireRow.Insert -- Regards, Tom Ogilvy "pda" wrote: Novice macro user needs help. I have a spreadsheet in which I want my user to intitiate a macro that inserts or deletes rows based on where she positions the cursor. So, say the user wishes to insert a line above b12. She positions the cursor on b12 and calls for the macro. How do I program the macro to accept the user's positioning of the cursor to insert the rows above the cursor's position? Thanks for sharing your knowledge. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
user's position of cursor influences macro
Thanks for the help! The form is much easier for the user to manage now!
"Tom Ogilvy" wrote: Sub abc() ActiveCell.EntireRow.Insert ActiveCell.EntireRow.Offset(1, 0).Copy ActiveCell.EntireRow Cells(ActiveCell.Row + 1, 2).Resize(1, 255).ClearContents End Sub -- Regards, Tom Ogilvy "pda" wrote in message ... Very cool. Thanks. But can I bother you for your assistance with a further refinement? I'd also like to select the row below, copy and insert the selection, and then clear the contents in the original rows of the second and subsequent columns (leaving a formula undisturbed in column A). Is it possible? "Tom Ogilvy" wrote: activecell.EntireRow.Insert -- Regards, Tom Ogilvy "pda" wrote: Novice macro user needs help. I have a spreadsheet in which I want my user to intitiate a macro that inserts or deletes rows based on where she positions the cursor. So, say the user wishes to insert a line above b12. She positions the cursor on b12 and calls for the macro. How do I program the macro to accept the user's positioning of the cursor to insert the rows above the cursor's position? Thanks for sharing your knowledge. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
cursor position | Excel Discussion (Misc queries) | |||
How do you set cursor position at current date in macro? | Excel Worksheet Functions | |||
Help: Making a copying macro from cursor position ? | Excel Programming | |||
Cursor Position in VBE | Excel Programming | |||
cursor position | Excel Programming |