Unhide & copy on double click

adamsm

Active Member
Joined
Apr 20, 2010
Messages
444
I'm trying to make the following code to un-hide row 12, copy the value in cell D17 if the cell I10 is empty and then change the value in D17 by 1.


Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
Application.ScreenUpdating = False
    If Target.Address(False, False) = "I11" Then
    Cancel = True
    Rows(12).Hidden = False
Target.Copy
Range("I10").PasteSpecial Paste:=xlPasteValues
 End If
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
How could I do the needful?

Any help would be kindly appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try:

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
 
If Target.Address = "$I$11" Then
    Rows(12).EntireRow.Hidden = False
    If IsEmpty(Range("I10")) Then
        Range("I10").Value = Range("D17").Value
        Range("D17").Value = Range("D17").Value + 1
    End If
End If
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,756
Members
452,940
Latest member
rootytrip

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