Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Mouse over message

(Win XP Home SP2, Office XP)

Hi all,

I have a collection of discs in numerous cases that each hold 510
discs.

Column A has the disc number info (#'s 1 - 2600)

I would like to be able to mouse over or click the cell with the disc
number and it tell me what case and position the disc is situated.

E.G. Discs 1 to 510 are in positions 1 to 510 in case 1, Discs 511 to
1020 are in positions 1 to 510 in case 2 etc.

If I mouse over or click the cell for disc #530 I would like to see a
popup or similar telling me that the disc is in position 20 in case 2
(2-20 format would suffice).

Any help would be greatly appreciated.

TIA

Robbie

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Mouse over message

This does it on a cell select

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
MsgBox "Case " & (.Row \ 510 + 1) & _
", position" & .Row - ((.Row \ 510) * 510)
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

wrote in message
oups.com...
(Win XP Home SP2, Office XP)

Hi all,

I have a collection of discs in numerous cases that each hold 510
discs.

Column A has the disc number info (#'s 1 - 2600)

I would like to be able to mouse over or click the cell with the disc
number and it tell me what case and position the disc is situated.

E.G. Discs 1 to 510 are in positions 1 to 510 in case 1, Discs 511 to
1020 are in positions 1 to 510 in case 2 etc.

If I mouse over or click the cell for disc #530 I would like to see a
popup or similar telling me that the disc is in position 20 in case 2
(2-20 format would suffice).

Any help would be greatly appreciated.

TIA

Robbie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Mouse over message

Thanks for the speedy reply Bob.

It almost works. Your code refers to row numbers when in fact it is the
cell value that is required as the data can be sorted differently at
any given time.

e.g. cell value is 1000 therefore it should return Case 2, Position 490

Would it be best to divide the cell value by 510 and then round up to
the nearest whole number to determine Case number?

For position perhaps loop the cell value minus 510 until the answer is
< 511, if cell value is less than 510 then position equals cell value.

Your help would be greatly appreciated again.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Mouse over message

Perhaps if I had looked at your code before posting I would have seen
it does everything I needed.

Thanks again Bob it was much appreciated.

All I did was replace the ".Row" with ".Value" and all worked to
perfection.

Robbie

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
View Message when Mouse Hovers over Cell. (Not the Comments Feild) Kev - Radio Man Excel Worksheet Functions 2 June 1st 10 01:02 AM
Mouse rollover pop-up message rhemingway Excel Worksheet Functions 6 March 11th 08 03:50 PM
my mouse moves diagonally when i scroll on mouse? BKMISHRA Excel Worksheet Functions 0 June 29th 05 11:43 AM
Mouse Wheel & Mouse Drivers Otto Moehrbach Excel Programming 3 May 7th 05 09:16 PM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM


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

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

About Us

"It's about Microsoft Excel"