Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invisible object with macro

Status
Not open for further replies.

sogc

Technical User
Jun 8, 2004
34
CA
I've created a spreadsheet with several sheets each with their own set of macros. On one of the sheets, I have a weird situation. When I hover the mouse of the cells in the range of Z6:AE29, my mouse pointer is showing the pointing finger as if there is a button under it. When I click it, it tries to access a macro from another worksheet from the original spreadsheet.

Here's the weird thing, if I scroll horizontally or vertically, the hand disappears and I can click around normally. When I return the horizontal and vertical scroll bars back to their home positions, the hand comes back.

This only happens in my Excel 97 version (I suspect it might happen in Excel 2000 as well). It is not happening in my Excel 2007 version. The problem is I am preparing this worksheet for a customer that uses Excel 2000.

Also, this only happens when I have the sheet protected.

I'd really appreciate it if someone could take a look. You can download the offending sheet at
 



Hi,

In column Z, you have a Data Validation DropDown. Thus the Hand.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
so why is it invoking a macro. I have data validation everywhere in that range. my problem is that it is invoking a macro from another worksheet.

any ideas?
 





When you state, "it tries to access a macro from another worksheet from the original spreadsheet," does spreadsheet mean WORKBOOK or WORKSHEET.

Unfortunately, the workbook and single worksheet you posted, do not demonstrate that problem.



Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
spreadsheet means another workbook. The workbook I provided for download is a copy of one of the worksheets in the original workbook.

this behaviour of invoking a macro from a different worksheet from the original workbook only exhibits itself in Excel 97. Would you happen to have a copy of Excel 2000 from which you can test if this issue occurs?

If it does, what do you suggest. I can't understand how a macro from another worksheet is assigned to no object but yet when I click in that space when the worksheet if protected, it invokes this off worksheet macro.

I beginning to think it's just an Excel 97 bug.
 




What is this macro doing?

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
The macro inserts some records in another worksheet. There are no references in my macros between worksheets. That is to say, none of the macros call other worksheets, with the exception of the close workbook macro [Private Sub Workbook_BeforeClose(Cancel As Boolean)], where I'm simply hiding worksheets. The macro that is being executed is from another worksheet (in another workbook in this case).

Now from what I understand, macros are attached to objects which when clicked on will execute the macro. I have no objects in that area except for having data validation turned on for those cells.

Is Excel 97 getting confused with data validation cells as an object? And even if it was, I never "assigned" macros to them. And finally, this incorrect macro behaviour only occurs when the worksheet is protected.

mmmmmmm. very frustrating.
 




"...macros are attached to objects ..."

Not true! Macros can be executed when certain objects occur, but it is not ncessarily the case.

The only way to know is to see the code in the other workbook. in the context of the objects in that workbook. It could be, for instance, that a macro is running when the Workbook_SheetCalculate or the Worksheet_Calculate events.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
I have checked the ThisWorkbook sheet in the VBA module. No reference to Workbook_SheetCalculate or the Worksheet_Calculate events.

I have abandonned trying to fix this one. My workaround is to leave the worksheet Unprotected.

Thanks for your input.
 
Have you tried to right-click the area? I could create similar effect by inserting a shape, assigning a macro to it, and finally making the shape transparent and with no border.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top