Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Userform lookup date value in database BernzG[_4_] Excel Programming 2 June 9th 05 11:10 PM
DELETING DATA FROM USERFORM [email protected] Excel Programming 1 May 8th 05 05:43 PM
deleting userform or VBA modules by makro pat \(belgium\) Excel Programming 2 March 1st 05 03:08 PM
Check if Userform exsists before deleting via VB Rich[_15_] Excel Programming 1 September 19th 03 05:10 AM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"