ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro not performing (https://www.excelbanter.com/excel-programming/339985-macro-not-performing.html)

Jim May

Macro not performing
 
When I double-click on a value in a cell in Column A of my sheet - Nothing
happens ?? From the Code below is it
Obvious what my problem is?
Thanks in Advance...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
Load frmPOReq
With frmPOReq
.TxtSeqNo.Value = Target.Value
.txtDate.Value = Target.Offset(0, 1).Value
.txtEmpCode.Value = Target.Offset(0, 2).Value
.txtAmt.Value = Target.Offset(0, 3).Value
.txtDueDate.Value = Target.Offset(0, 4).Value
.txtBudCat.Value = Target.Offset(0, 5).Value
.txtAcct.Value = Target.Offset(0, 6).Value
End With
End If
Cancel = True
End Sub



Rowan[_8_]

Macro not performing
 
Add the show command

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
Load frmPOReq
With frmPOReq
.TxtSeqNo.Value = Target.Value
.txtDate.Value = Target.Offset(0, 1).Value
.txtEmpCode.Value = Target.Offset(0, 2).Value
.txtAmt.Value = Target.Offset(0, 3).Value
.txtDueDate.Value = Target.Offset(0, 4).Value
.txtBudCat.Value = Target.Offset(0, 5).Value
.txtAcct.Value = Target.Offset(0, 6).Value
.show
End With
End If
Cancel = True
End Sub

Hope this helps
Rowan

Jim May wrote:
When I double-click on a value in a cell in Column A of my sheet - Nothing
happens ?? From the Code below is it
Obvious what my problem is?
Thanks in Advance...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
Load frmPOReq
With frmPOReq
.TxtSeqNo.Value = Target.Value
.txtDate.Value = Target.Offset(0, 1).Value
.txtEmpCode.Value = Target.Offset(0, 2).Value
.txtAmt.Value = Target.Offset(0, 3).Value
.txtDueDate.Value = Target.Offset(0, 4).Value
.txtBudCat.Value = Target.Offset(0, 5).Value
.txtAcct.Value = Target.Offset(0, 6).Value
End With
End If
Cancel = True
End Sub



Jim May

Macro not performing
 
Thanks for the help;
I hope I never forget that one,,,
Jim

"Rowan" wrote in message
...
Add the show command

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
Load frmPOReq
With frmPOReq
.TxtSeqNo.Value = Target.Value
.txtDate.Value = Target.Offset(0, 1).Value
.txtEmpCode.Value = Target.Offset(0, 2).Value
.txtAmt.Value = Target.Offset(0, 3).Value
.txtDueDate.Value = Target.Offset(0, 4).Value
.txtBudCat.Value = Target.Offset(0, 5).Value
.txtAcct.Value = Target.Offset(0, 6).Value
.show
End With
End If
Cancel = True
End Sub

Hope this helps
Rowan

Jim May wrote:
When I double-click on a value in a cell in Column A of my sheet -
Nothing happens ?? From the Code below is it
Obvious what my problem is?
Thanks in Advance...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Column = 1 Then
Load frmPOReq
With frmPOReq
.TxtSeqNo.Value = Target.Value
.txtDate.Value = Target.Offset(0, 1).Value
.txtEmpCode.Value = Target.Offset(0, 2).Value
.txtAmt.Value = Target.Offset(0, 3).Value
.txtDueDate.Value = Target.Offset(0, 4).Value
.txtBudCat.Value = Target.Offset(0, 5).Value
.txtAcct.Value = Target.Offset(0, 6).Value
End With
End If
Cancel = True
End Sub





All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com