Deleting User input in a user form

Logistix

Board Regular
Joined
Aug 23, 2006
Messages
77
Hi there,

Does anyone know the code to delete a line in excel I've just created using my userform.

The code for inserting user input is:


Worksheets("Records").Range("Start").End(xlDown).Select

With Selection

RefNumInt = .Offset(0, 0) + 1

.Offset(1, 0) = RefNumInt
.Offset(1, 1) = EmployeeNameBox
.Offset(1, 2) = DTPicker1
.Offset(1, 3) = HoursDepositBox

End With



I just need help with deleting the line if the input has been incorrect.

Any help would be much appreciated. Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I don't Understand how can it be a wrong value you are the one putting it their by code. You need to test your named ranges for some standards before your code posts these values.

If you want the user to check the new data, after the code posts it and then to have the option of "un-due" that update then:


Worksheets("Records").Range("Start").End(xlDown).Select

With Selection
.Offset(0, 0) = ""
.Offset(0, 1) = ""
.Offset(0, 2) = ""
.Offset(0, 3) = ""
End With
 
Upvote 0

Forum statistics

Threads
1,226,453
Messages
6,191,137
Members
453,642
Latest member
jefals

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