VBA code

kellydanthuy

New Member
Joined
Jan 30, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
1706624430707.png

Hi All,

How can I update the code below if I would like to add one more column as picture?

Thank you for you all advice.

Option Explicit


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

On Error Resume Next
With Application
.Cursor = xlNorthwestArrow
BooleanCellDoubleClick Target, [Checklist_Table[[Done]]], Cancel
.Cursor = xlDefault
End With

End Sub


Private Sub BooleanCellDoubleClick(rTarget As Range, rValidRange As Range, Cancel As Boolean)

On Error Resume Next
Application.CellDragAndDrop = False

If rTarget.Cells.Count > 1 Then Exit Sub
If Intersect(rTarget, rValidRange) Is Nothing Then Exit Sub

If Len(rTarget) Then
rTarget = vbNullString
Else
rTarget = 1
End If

Cancel = True

End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You should explain what you need to do and which columns of the shown table should be involved
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top