ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 6,002
- Office Version
- 2024
- Platform
- Windows
Below was the working code in use BUT My Datepicker doesnt work for 64 bit.
The line of code in RED is the issue.
Now on my userform i have TextBox12 with todays date but unable to see how i replace the line in RED for correct code
I select a custopmer in the listbox & run the code.
Its supposed to then add todays date on my userform.
I see the MsgBox advising its done but actually it isnt.
The line of code in RED is the issue.
Now on my userform i have TextBox12 with todays date but unable to see how i replace the line in RED for correct code
I select a custopmer in the listbox & run the code.
Its supposed to then add todays date on my userform.
I see the MsgBox advising its done but actually it isnt.
Rich (BB code):
Private Sub DateTransferButton_Click()
'Dantes code
Dim sh As Worksheet
Dim b As Range
Dim wName As String, res As Variant
If ListBox2.ListIndex = -1 Then
MsgBox "YOU DIDNT SELECT A CUSTOMERS NAME", vbCritical, "DELIVERY PARCEL DATE TRANSFER"
Exit Sub
End If
wName = ListBox2.List(ListBox2.ListIndex)
Set sh = Sheets("POSTAGE")
Set b = sh.Columns("B").Find(wName, LookIn:=xlValues, LookAt:=xlWhole)
If Not b Is Nothing Then
If sh.Cells(b.Row, "G") <> "" And UCase(sh.Cells(b.Row, "G")) <> "POSTED" Then
MsgBox "DATE HAS BEEN ENTERED ALREADY !" & vbCrLf & "CLICK OK TO GO CHECK IT OUT", vbCritical, "Delivery Parcel Date Transfer"
Unload PostageTransferSheet
Cells(b.Row, "G").Select
Else
'sh.Cells(b.Row, "G").Value = CDate(Datepicker1.Value)
sh.Cells(b.Row, "G").Interior.Color = vbYellow
MsgBox "DATE APPLIED TO WORKSHEET FOR " & ListBox2.Value, vbInformation, "DELIVERY PARCEL DATE TRANSFER MESSAGE"
ListBox2.Clear
UserForm_Initialize
End If
End If
ListBox2 = ""
End Sub