ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   beforerightclick and selection change issue (https://www.excelbanter.com/excel-programming/419151-beforerightclick-selection-change-issue.html)

DennisB[_2_]

beforerightclick and selection change issue
 
I have a report where I use the selection change worksheet event to display a
form1. I want to use the beforerightclick event to display another form,
form2 and not display the form from the selection change. I have a
workaround but form1 quickly displays and then unloads in a flicker. I don't
want to see this flicker.

Here is my code:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
'unload form1 which is displayed on the selection change event
Unload frmAcctDrillDown
Cancel = True
'load form2
Load frmNotes
frmNotes.Show


End Sub


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com