Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Display cursor position in cell

Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Display cursor position in cell

Regina, here is one way, right click on the worksheet tab and view code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Display cursor position in cell

Thank you Paul,

but what I need is a continuous display of coordinates of actual
coordinate-values whenever mouse is moved.

RR

"Paul B" schrieb im Newsbeitrag
...
Regina, here is one way, right click on the worksheet tab and view code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Display cursor position in cell

Here is code by Patrick Malloy that shows it every second:

Option Explicit
Global bShowPos As Boolean
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Type POINTAPI
X As Long
Y As Long
End Type
Sub start_timer()
bShowPos = True
Application.OnTime Now + _
TimeValue("0:00:01"), "ShowPos"
End Sub
Sub ShowPos()
Dim lRetVal As Long
Dim Pos As POINTAPI
lRetVal = GetCursorPos(Pos)
Application.StatusBar = Pos.X & ", " & Pos.Y
Range("A1") = Pos.X & ", " & Pos.Y
If bShowPos Then
start_timer
Else
Application.StatusBar = False
End If
End Sub
Sub Stop_Timer()
bShowPos = False
End Sub

--
Regards,
Tom Ogilvy

"Regina Rodler" wrote in message
...
Thank you Paul,

but what I need is a continuous display of coordinates of actual
coordinate-values whenever mouse is moved.

RR

"Paul B" schrieb im Newsbeitrag
...
Regina, here is one way, right click on the worksheet tab and view code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Display cursor position in cell

This code by Bob Phillips would be more responsive:
http://groups.google.co.uk/groups?hl... NGP11.phx.gbl

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
Here is code by Patrick Malloy that shows it every second:

Option Explicit
Global bShowPos As Boolean
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Type POINTAPI
X As Long
Y As Long
End Type
Sub start_timer()
bShowPos = True
Application.OnTime Now + _
TimeValue("0:00:01"), "ShowPos"
End Sub
Sub ShowPos()
Dim lRetVal As Long
Dim Pos As POINTAPI
lRetVal = GetCursorPos(Pos)
Application.StatusBar = Pos.X & ", " & Pos.Y
Range("A1") = Pos.X & ", " & Pos.Y
If bShowPos Then
start_timer
Else
Application.StatusBar = False
End If
End Sub
Sub Stop_Timer()
bShowPos = False
End Sub

--
Regards,
Tom Ogilvy

"Regina Rodler" wrote in message
...
Thank you Paul,

but what I need is a continuous display of coordinates of actual
coordinate-values whenever mouse is moved.

RR

"Paul B" schrieb im Newsbeitrag
...
Regina, here is one way, right click on the worksheet tab and view

code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from

it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Display cursor position in cell

Thank you, Tom !

RR

"Tom Ogilvy" schrieb im Newsbeitrag
...
This code by Bob Phillips would be more responsive:
http://groups.google.co.uk/groups?hl... NGP11.phx.gbl

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
Here is code by Patrick Malloy that shows it every second:

Option Explicit
Global bShowPos As Boolean
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Type POINTAPI
X As Long
Y As Long
End Type
Sub start_timer()
bShowPos = True
Application.OnTime Now + _
TimeValue("0:00:01"), "ShowPos"
End Sub
Sub ShowPos()
Dim lRetVal As Long
Dim Pos As POINTAPI
lRetVal = GetCursorPos(Pos)
Application.StatusBar = Pos.X & ", " & Pos.Y
Range("A1") = Pos.X & ", " & Pos.Y
If bShowPos Then
start_timer
Else
Application.StatusBar = False
End If
End Sub
Sub Stop_Timer()
bShowPos = False
End Sub

--
Regards,
Tom Ogilvy

"Regina Rodler" wrote in message
...
Thank you Paul,

but what I need is a continuous display of coordinates of actual
coordinate-values whenever mouse is moved.

RR

"Paul B" schrieb im Newsbeitrag
...
Regina, here is one way, right click on the worksheet tab and view

code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from

it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR











  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Display cursor position in cell

Thank you Paul,

but what I need is a continuous display of
actual cursor position as mouse is moved.

RR

"Paul B" schrieb im Newsbeitrag
...
Regina, here is one way, right click on the worksheet tab and view code,
paste this in the window that opens
will put the cell address in A1, change to the cell you want

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
[A1] = ActiveCell.Address
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Regina Rodler" wrote in message
...
Hello there,

is it possible, and if so, how, to show X- and Y-coordinates
of the cursor position in a range / cell while mouse moves ?

Thank you in advance,

Regards,

RR





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
cursor position MarkT Excel Discussion (Misc queries) 5 February 7th 07 01:25 PM
Default cursor/selected cell position after protecting Stilla Excel Worksheet Functions 0 December 8th 05 02:28 PM
Why does cursor move position in a cell I'm trying to edit? BrendaK Excel Discussion (Misc queries) 3 August 22nd 05 10:32 PM
Cursor position saziz Excel Discussion (Misc queries) 2 August 9th 05 08:19 PM
cursor position Fan Fan Excel Programming 3 August 14th 04 01:12 AM


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