LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default inserting in wrong location

hi.
Can someone review the below code and suggest what i need to change to get
the macro to insert the range name " sample_style" where the cursor was at
the time the macro button was pressed. Currently, the macro inserts the
"sample style", beneath the "sample_style" range.
thanks in advance for any advice.
thx

If MsgBox("Do you want to insert a new style at your cursor", vbYesNo +
vbDefaultButton2) = vbYes Then

ActiveCell.EntireRow

Range("sample_style").Select
Selection.Copy
ActiveCell.EntireRow.Insert Shift:=xlDown
Else
Exit Sub
End If
End Sub
 
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
Macro - save to current location vs excel default location leezard Excel Discussion (Misc queries) 0 October 28th 08 03:04 PM
question on links where info is added and cell location is wrong question on links where info is added an Links and Linking in Excel 1 October 5th 07 08:23 AM
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
Wrong Hyperlink location after sorting Lawulm Excel Discussion (Misc queries) 6 November 17th 06 05:30 PM
Inserting after specific location on right click menu [email protected] Excel Discussion (Misc queries) 1 July 26th 06 11:29 PM


All times are GMT +1. The time now is 05:42 PM.

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

About Us

"It's about Microsoft Excel"