N
Nic
H
I found the following code whilst surfing the net and thought it would be very useful to me as i am currently compiling a list of some 24 columns in Excel. It does do exactly what it is meant to do i.e. upon right clicking within a row it shows me the contents of all columns within that row, which is great. However, there are times when i really could do with being able to turn this function off so that i can use the shortcut menus
Could anybody tell me a step by step way of assigning this code to a button so that i can turn this feature on and off as and when i require it? Just so you know, i am totally unfamiliar with VBA so please be gentle with me
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean
Dim intCounter As Intege
Dim txt As Strin
If Target.Column > 24 Then Exit Su
Cancel = Tru
For intCounter = 1 To 2
txt = txt & Cells(Target.Row, intCounter) & vbL
Next intCounte
MsgBox tx
End Su
Many thanks
I found the following code whilst surfing the net and thought it would be very useful to me as i am currently compiling a list of some 24 columns in Excel. It does do exactly what it is meant to do i.e. upon right clicking within a row it shows me the contents of all columns within that row, which is great. However, there are times when i really could do with being able to turn this function off so that i can use the shortcut menus
Could anybody tell me a step by step way of assigning this code to a button so that i can turn this feature on and off as and when i require it? Just so you know, i am totally unfamiliar with VBA so please be gentle with me
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean
Dim intCounter As Intege
Dim txt As Strin
If Target.Column > 24 Then Exit Su
Cancel = Tru
For intCounter = 1 To 2
txt = txt & Cells(Target.Row, intCounter) & vbL
Next intCounte
MsgBox tx
End Su
Many thanks