JoeyGaspard
Board Regular
- Joined
- Jul 22, 2019
- Messages
- 147
I am trying to run this piece of code to open and reset a userform, but each time I try to run it, I get a Run Time Error 380, Invalid Property Value, and when I click debug, it simply highlights this line of code:
With frmform
I have checked everything I know to check, with no luck, anyone have any ideas? Here is the entire block of vba:
Option Explicit
THanks in advance for any ideas!
With frmform
I have checked everything I know to check, with no luck, anyone have any ideas? Here is the entire block of vba:
Option Explicit
VBA Code:
Sub Reset()
Dim iRow As Long
iRow = [Counta(Database!A:A)]
With frmform
.dttoday.Value = [(Today()]
.Cmbpuloc.Clear
.DTPutime.Value = [(now()]
.DTarrival.Value = [(Today()]
.optyes.Value = False
.optno.Value = False
.cmbcustomer.Clear
.txtdelNo.Value = ""
.DTdeldate.Value = [(Today()]
.DTdeltime.Value = [(now()]
.txtPO.Value = ""
.cmbcarrier.Clear
.Txtweight.Value = ""
.txtbol.Value = ""
.cmbprod.Clear
.txtrate.Value = ""
.txtson.Value = ""
.txtamount.Value = ""
.txtload.Value = ""
.lsdatabase.ColumnCount = 18
.lsdatabase.ColumnHeads = True
If iRow > 1 Then
.lsdatabase.RowSource = "Database!A2:R" & iRow
Else:
.lsdatabase.RowSource = "Database!A2:R2"
End If
End With
End Sub
THanks in advance for any ideas!
Last edited by a moderator: