Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting data in userform and database
I found this code in the archives but it doesn't delete the data from the
database also. If the user accidentally makes a double entry i would like them to be able to delete it or void it out. What would you suggest? I also have a few formulas in the database and when the data is erased it tends to mess the formulas up. Have any ideas for that also. Thank you, Jennifer This is what i have so far. With Me.ListBox1 .RemoveItem .ListIndex End With -- Though daily learning, I LOVE EXCEL! Jennifer |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting data in userform and database
RemoveItem doesn't work if the list is bound to the data.
Since you say it works, then you must not be bound to data. With Me.ListBox1 idx = .ListIndex + 1 .RemoveItem .ListIndex End With With Worksheets("Data") .Range("A1").Offset(idex,0).Entirerow.Delete End With Assumes the data starts in row1 of the sheet named data with a header row -- Regards, Tom Ogilvy "Jennifer" wrote in message ... I found this code in the archives but it doesn't delete the data from the database also. If the user accidentally makes a double entry i would like them to be able to delete it or void it out. What would you suggest? I also have a few formulas in the database and when the data is erased it tends to mess the formulas up. Have any ideas for that also. Thank you, Jennifer This is what i have so far. With Me.ListBox1 .RemoveItem .ListIndex End With -- Though daily learning, I LOVE EXCEL! Jennifer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Userform lookup date value in database | Excel Programming | |||
DELETING DATA FROM USERFORM | Excel Programming | |||
deleting userform or VBA modules by makro | Excel Programming | |||
Check if Userform exsists before deleting via VB | Excel Programming |