Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 18th, 2006, 07:55 AM
Registered User
 
Join Date: Apr 2006
Location: Sydney, NSW, Australia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to gavins_satori
Default Change Cursor when over a cell

How can you change the Mouse cursor/icon when it is over a certain range of cells in Excel. There isn't a mouse mouse event so is this possible? Much appreciate any guidence on this.
Thanks
Reply With Quote
  #2 (permalink)  
Old April 19th, 2006, 03:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: London, , United Kingdom.
Posts: 173
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Gavin,

This can't be done in Excel VBA.

In theory you could subclass Excel to try to trap the MOUSEMOVE windows messages, then test to see whether the current mouse co-ordinates are the same as your set of special cells and in in which case set the mouse icon accordingly. In practice, however, subclassing Excel in VBA rarely works as VBA is too slow to process all the messages and Excel tends to crash.

If you were really desparate to get this sort of functionality then you could try looking at writing some custom add-ins for excel in VB / C++ but you're getting a bit out of my depth there and it will be a lot of work to achieve the effect.

HTH,
Maccas

Reply With Quote
  #3 (permalink)  
Old April 19th, 2006, 06:18 PM
Registered User
 
Join Date: Apr 2006
Location: Sydney, NSW, Australia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to gavins_satori
Default

Thanks for this. What about .net ie: Office Studio. Would this be possible to develop this functionality in that. I have seen other application that use Excel for their front-end, where they are able to control the mouse icon as it moves to a particular cell location. I suppose this was developed in their add-ins ie: C# or similar. Any further clues would be great help on this journey for enlightenment.

Thanks

Reply With Quote
  #4 (permalink)  
Old April 20th, 2006, 03:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: London, , United Kingdom.
Posts: 173
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Absolutely. I've not actually tried to use VS.Net but I understand that you can create compiled code that will handle windows messages thereby allowing you to determine when the mouse moves over a certain set of cells.

Since I've not tried this I can't help you much more but I would suggest that if your only programming experience is with VBA then you might find VB.Net easier to pick than C#.Net. They can both, ultimately, do the same things.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change value in GridView Cell Sheraz Khan ASP.NET 2.0 Professional 2 August 30th, 2007 11:12 AM
How to change the value of one cell in a GridView? jameslin288@yahoo.com ASP.NET 2.0 Basics 8 November 19th, 2006 12:12 PM
change cell color martin1 Visual Basic 2005 Basics 2 October 4th, 2006 08:55 AM
Change Cell Color phungleon HTML Code Clinic 2 April 9th, 2006 12:36 AM
Change Cursor Type When Using the Command Object hcweb Classic ASP Basics 2 April 7th, 2004 01:08 PM



All times are GMT -4. The time now is 12:03 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.