Run Time Error 380, Invalid Property Value - Excel VBA

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

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:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try it like
VBA Code:
.dttoday.Value = Date
.DTPutime.Value = Now
 
Upvote 0
Try it like
VBA Code:
.dttoday.Value = Date
.DTPutime.Value = Now
1620065470174.png

Thanks Fluff, Now its getting this...
 
Upvote 0
It's a long time since I worked with the in built date pickers & I don't have them installed on my current computer. So cannot help any further.
 
Upvote 0
It's a long time since I worked with the in built date pickers & I don't have them installed on my current computer. So cannot help any further.
I removed the pickers and just inserted text boxes, now getting a new error on a different line:

1620066328375.png
 
Upvote 0
What is the error message & number?
 
Upvote 0
Glad it's sorted & thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top