#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 202
Default mouse location

I have a protected worksheet.

How can I insert a Row based on the location of the cursor using a Macro?

Need the location of the Row based on the location of the cursor.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default mouse location

Something like...

Option Explicit
Sub testme()
Dim myPWD As String

myPWD = "hi"

ActiveSheet.Unprotect Password:=myPWD
ActiveCell.Offset(1, 0).Insert
ActiveSheet.Protect Password:=myPWD

End Sub

(this inserts a row under the activecell. remove .offset(1,0) if you want it
above the activecell.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Dennis wrote:

I have a protected worksheet.

How can I insert a Row based on the location of the cursor using a Macro?

Need the location of the Row based on the location of the cursor.

Thanks


--

Dave Peterson
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
Mouse pointer becomes hyperlink when sheet protected GillianHG Excel Discussion (Misc queries) 0 September 28th 05 04:30 PM
HELP: Mouse Pointer Changes When Sheet Protected GillianHG Excel Discussion (Misc queries) 2 September 23rd 05 08:42 PM
Stock Location Sorting Problem mark1caroline Excel Discussion (Misc queries) 3 July 13th 05 04:53 PM
Track Mouse Location In a Sheet VBA mowali Excel Discussion (Misc queries) 0 June 13th 05 05:59 PM
Mouse continues to select after clicking on a cell in excel. Fletch Excel Discussion (Misc queries) 4 February 22nd 05 03:27 AM


All times are GMT +1. The time now is 01:20 AM.

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"