Run Time Error 380, Invalid Property Value - Excel VBA

JoeyGaspard

Board Regular
Joined
Jul 22, 2019
Messages
134
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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,473
Office Version
  1. 365
Platform
  1. Windows
Try it like
VBA Code:
.dttoday.Value = Date
.DTPutime.Value = Now
 

JoeyGaspard

Board Regular
Joined
Jul 22, 2019
Messages
134
Try it like
VBA Code:
.dttoday.Value = Date
.DTPutime.Value = Now
1620065470174.png

Thanks Fluff, Now its getting this...
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,473
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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.
 

JoeyGaspard

Board Regular
Joined
Jul 22, 2019
Messages
134
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,473
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

What is the error message & number?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,473
Office Version
  1. 365
Platform
  1. Windows
Glad it's sorted & thanks for letting us know.
 

Forum statistics

Threads
1,141,487
Messages
5,706,663
Members
421,459
Latest member
Taamrak

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
Top