I'm fluent in batch files, but lately find myself having to manipulate VBA Code in Excel files to which I'm having varying degrees of success.
I'm trying to insert 2 different "Private Sub" codes into a worksheet but am finding mixing or combining them too difficult for my skillset.
One code is to enter the date/time when a specific cell is double clicked - works fine.
The other code is to save the document without the save box popping up when the document is closed - untested
I've googled and found a lot of similar posts, but haven't found anything giving me the specific answer/s I need.
I've included the 2 code's I'm using below. Simply putting one under the other causes an error and the 2nd code to do nothing.
There is a trick I'm missing.
Code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("H1:H1000000")) Is Nothing Then
Cancel = True
Target.Formula = Now
End If
End Sub