Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim lngRow As Long
'Limit Target count to 1
If Target.Count > 1 Then Exit Sub
'Isolate Target to a specific range
If Intersect(Target, Range("tildes")) Is Nothing Then Exit Sub
lngRow = Target.Row
'set Target font tp "marlett"
Target.Font.Name = "marlett"
'Check value of target
If Target.Value <> "1" Then
Target.Value = "1" 'Sets target Value = "a"
' check it's column B
If Target.Column = 2 Then
With Sheets("PRINT")
.Cells(4, "B").Value = Cells(lngRow, "R").Value
.Cells(5, "B").Value = Cells(lngRow, "Q").Value
.Cells(6, "B").Value = Cells(lngRow, "T").Value
.Cells(7, "B").Value = Cells(lngRow, "G").Value
.Cells(1, "E").Value = Cells(lngRow, "A").Value
.Cells(16, "I").Value = Cells(lngRow, "A").Value
.PrintOut From:=1, To:=1, Copies:=2, _
ActivePrinter:="HP LaserJet 1220 Series PCL (Copiar 1) en Ne00:", Collate:= _
True
.Cells(4, "B").Resize(4).ClearContents
End With
End If
Cancel = True
Exit Sub
End If
If Target.Value = "1" Then
Target.ClearContents 'Sets Target Value = ""
Cancel = True
Exit Sub
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim lngRow As Long
'Limit Target count to 1
If Target.Count > 1 Then Exit Sub
'Isolate Target to a specific range
If Intersect(Target, Range("tildes")) Is Nothing Then Exit Sub
lngRow = Target.Row
'set Target font tp "marlett"
Target.Font.Name = "marlett"
'Check value of target
If Target.Value <> "1" Then
Target.Value = "1" 'Sets target Value = "a"
' check it's column B
If Target.Column = 2 Then
With Sheets("PRINT")
.Cells(4, "B").Value = Cells(lngRow, "R").Value
.Cells(5, "B").Value = Cells(lngRow, "Q").Value
.Cells(6, "B").Value = Cells(lngRow, "T").Value
.Cells(7, "B").Value = Cells(lngRow, "G").Value
.Cells(1, "E").Value = Cells(lngRow, "A").Value
.Cells(16, "I").Value = Cells(lngRow, "A").Value
.PrintOut From:=1, To:=1, Copies:=2, _
ActivePrinter:="HP LaserJet 1220 Series PCL (Copiar 1) en Ne00:", Collate:= _
True
.Cells(4, "B").Resize(4).ClearContents
End With
With Sheets("HISTORY")
.Cells(4, "B").Value = Cells(lngRow, "R").Value
.Cells(5, "B").Value = Cells(lngRow, "Q").Value
.Cells(6, "B").Value = Cells(lngRow, "T").Value
.Cells(7, "B").Value = Cells(lngRow, "G").Value
.Cells(1, "E").Value = Cells(lngRow, "A").Value
.Cells(16, "I").Value = Cells(lngRow, "A").Value
end with
End If
Cancel = True
Exit Sub
End If
If Target.Value = "1" Then
Target.ClearContents 'Sets Target Value = ""
Cancel = True
Exit Sub
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim lngRow As Long
'Limit Target count to 1
If Target.Count > 1 Then Exit Sub
'Isolate Target to a specific range
If Intersect(Target, Range("tildes")) Is Nothing Then Exit Sub
lngRow = Target.Row
'set Target font tp "marlett"
Target.Font.Name = "marlett"
'Check value of target
If Target.Value <> "1" Then
Target.Value = "1" 'Sets target Value = "a"
' check it's column B
If Target.Column = 2 Then
With Sheets("PRINT")
.Cells(4, "B").Value = Cells(lngRow, "R").Value
.Cells(5, "B").Value = Cells(lngRow, "Q").Value
.Cells(6, "B").Value = Cells(lngRow, "T").Value
.Cells(7, "B").Value = Cells(lngRow, "G").Value
.Cells(1, "E").Value = Cells(lngRow, "A").Value
.Cells(16, "I").Value = Cells(lngRow, "A").Value
.PrintOut From:=1, To:=1, Copies:=2, _
ActivePrinter:="HP LaserJet 1220 Series PCL (Copiar 1) en Ne00:", Collate:= _
True
.Cells(4, "B").Resize(4).ClearContents
End With
With Sheets("HISTORY")
.Cells(2, "A").Value = Cells(lngRow, "R").Value
.Cells(2, "B").Value = Cells(lngRow, "Q").Value
.Cells(2, "C").Value = Cells(lngRow, "T").Value
.Cells(2, "D").Value = Cells(lngRow, "G").Value
.Cells(2, "E").Value = Cells(lngRow, "A").Value
.Cells(2, "F").Value = Cells(lngRow, "A").Value
End With
End If
Cancel = True
Exit Sub
End If
If Target.Value = "1" Then
Target.ClearContents 'Sets Target Value = ""
Cancel = True
Exit Sub
End If
End Sub
while Sheets("HISTORY").Cells(lngNextHistRow , "A").Value <> ""
Thanks!