Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lee Lee is offline
external usenet poster
 
Posts: 8
Default Custom Right Click Menus - Inconsistent Functionality

I have an Excel Workbook with customized, context sensitive, right
click options. This Workbook is widely distributed to my colleagues,
and I have run into an issue on one computer so far.

While the right click options that I'm adding work perfectly fine on
every other machine so far, one computer simply does not display
them.


I have checked the library references in the Excel Workbook, and none
of the required libararies appear to be missing or de-selected on
this
system. I have tried re-installing the MSO.DLL file (Microsoft Office
11.0 Object Library) but this didn't solve the problem either.


All of our systems are running Windows XP with Office 2003.


If anyone has seen an issue like this or has any ideas, your comments
are appreciated.


Below is a section of the code I am using to create the custom right
click options:

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
Dim cBut As CommandBarButton

On Error Resume Next
For i = 4 To 1 Step -1
If Application.CommandBars("Cell").Controls(i).BuiltI n =
False Then
Application.CommandBars("Cell").Controls(i).Delete
End If
Next i

If ActiveSheet.Index = 2 And ActiveCell.Column = 4 Then
Set cBut =
Application.CommandBars("Cell").Controls.Add(Befor e:=1,
Temporary:=True)

With cBut
If ActiveCell.Font.Bold = False Then
.Caption = "Lock Date"
Else
.Caption = "Unlock Date"
End If

.BeginGroup = True
.Style = msoButtonCaption
.OnAction = "Module6.LockSelection"

If ActiveCell.Text < "" And ActiveCell.Row <= LastRow
Then
.Enabled = True
Else
.Enabled = False
End If
End With
...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Custom Right Click Menus - Inconsistent Functionality

Could be...
The user has a hidden sheet or some columns hidden.
The user is in print preview or page break preview.

Suggest you remove the on error resume next and run the code.
I suspect that will provide some answers.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Lee"
wrote in message
I have an Excel Workbook with customized, context sensitive, right
click options. This Workbook is widely distributed to my colleagues,
and I have run into an issue on one computer so far.

While the right click options that I'm adding work perfectly fine on
every other machine so far, one computer simply does not display
them.
I have checked the library references in the Excel Workbook, and none
of the required libararies appear to be missing or de-selected on
this
system. I have tried re-installing the MSO.DLL file (Microsoft Office
11.0 Object Library) but this didn't solve the problem either.
All of our systems are running Windows XP with Office 2003.
If anyone has seen an issue like this or has any ideas, your comments
are appreciated.
Below is a section of the code I am using to create the custom right
click options:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
Dim cBut As CommandBarButton

On Error Resume Next
For i = 4 To 1 Step -1
If Application.CommandBars("Cell").Controls(i).BuiltI n = False Then
Application.CommandBars("Cell").Controls(i).Delete
End If
Next i

If ActiveSheet.Index = 2 And ActiveCell.Column = 4 Then
Set cBut = _
Application.CommandBars("Cell").Controls.Add(Befor e:=1, Temporary:=True)
With cBut
If ActiveCell.Font.Bold = False Then
..Caption = "Lock Date"
Else
..Caption = "Unlock Date"
End If
..BeginGroup = True
..Style = msoButtonCaption
..OnAction = "Module6.LockSelection"
If ActiveCell.Text < "" And ActiveCell.Row <= LastRow Then
..Enabled = True
Else
..Enabled = False
End If
End With
...

  #3   Report Post  
Posted to microsoft.public.excel.programming
Lee Lee is offline
external usenet poster
 
Posts: 8
Default Custom Right Click Menus - Inconsistent Functionality

On Feb 2, 10:12 pm, "Jim Cone" wrote:
Could be...
The user has a hidden sheet or some columns hidden.
The user is in print preview or page break preview.

Suggest you remove the on error resume next and run the code.
I suspect that will provide some answers.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware



Thanks for your response.

Unfortunately, and I should have mentioned it, I did try removing the
resume on error and no error occurred. The most frustrating thing is
that the EXACT same file works on several other machines but not this
one. Leads me to believe that it MUST be an issue with a library file
or something specific to Excel on his computer.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Custom Right Click Menus - Inconsistent Functionality

For what it's worth, check the mouse settings in Control Panel Printers and
Other Hardware mouse

"Lee" wrote:

On Feb 2, 10:12 pm, "Jim Cone" wrote:
Could be...
The user has a hidden sheet or some columns hidden.
The user is in print preview or page break preview.

Suggest you remove the on error resume next and run the code.
I suspect that will provide some answers.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware



Thanks for your response.

Unfortunately, and I should have mentioned it, I did try removing the
resume on error and no error occurred. The most frustrating thing is
that the EXACT same file works on several other machines but not this
one. Leads me to believe that it MUST be an issue with a library file
or something specific to Excel on his computer.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Right Click Menus - Inconsistent Functionality

Does that user have the workbook in pagebreak preview view (as seen under
the view menu)?

That uses a different right click menu, but can look like a normal
worksheet.

--
Regards,
Tom Ogilvy



"Lee" wrote in message
oups.com...
On Feb 2, 10:12 pm, "Jim Cone" wrote:
Could be...
The user has a hidden sheet or some columns hidden.
The user is in print preview or page break preview.

Suggest you remove the on error resume next and run the code.
I suspect that will provide some answers.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware



Thanks for your response.

Unfortunately, and I should have mentioned it, I did try removing the
resume on error and no error occurred. The most frustrating thing is
that the EXACT same file works on several other machines but not this
one. Leads me to believe that it MUST be an issue with a library file
or something specific to Excel on his computer.



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
Change Single-Click Functionality? Wuddus Excel Discussion (Misc queries) 2 September 10th 07 11:54 AM
Custom Right Click Menus - Inconsistent Functionality Lee Excel Discussion (Misc queries) 1 February 3rd 07 03:41 AM
Assign click functionality to dynamically created textboxes? Ouka[_17_] Excel Programming 3 August 25th 05 03:15 AM
How to restore right click functionality for copy and paste? duncansk Excel Discussion (Misc queries) 3 August 11th 05 12:39 PM
Programming double click functionality Cyberindio Excel Programming 1 June 19th 04 10:13 AM


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