Deleting values from a text file

cs1ctp

Board Regular
Joined
Oct 7, 2005
Messages
122
Hi,

What is the code for deleting a row from a text file. Basically when I click a button on a UserForm, the text file is read and placed into an array called ArrayContract(). I then compare ComboBox1 on the UserForm with all the values in ArrayContract. When a match is found, I save the position in ArrayContract as a variable. I then want to delete from the text file the position that i have just located.

Hope this makes sense,

Chris
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Chris

As far as I know there is no (simple) code to do that.

What you would need to do is recreate the text file without the missing data.
 
Upvote 0
[May I be forgiven for blaspheming against Excel] but wouldn't Word be a better platform for editing a contract?
 
Upvote 0

Forum statistics

Threads
1,203,242
Messages
6,054,349
Members
444,717
Latest member
melindanegron

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