Help creating a userform

sew07

New Member
Joined
Aug 10, 2019
Messages
10
Hi,

I have created a userform. It has list boxes which are populated with the tables on my worksheet.

My goal is to modify the data on these tables using the userform. I would like to select multiple rows in one listbox and move them to another listbox with a button that updates the tables with the modifications. I would also like to insert new data into the table using the userform

I have managed to get a code for the delete button working which deletes selected rows from the listbox on the userform and in turn deletes the same rows from the table on my worksheet but have been unsuccessful in getting codes to work for the other buttons.

Any help would be greatly appreciated as I have been struggling with this for a while and I think it would take a real expert in coding to get this working.

I hope I have explained this clear enough and feel free to ask me more questions.

Thanks
 

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.
Welcome to the forum @sew07

One way would be to ...
- move the data from one table to another
( cut and paste ? )
- refresh listboxes
- edit the data ( if required ) after it arrives in its new home
- add new data

A few questions ..
- are the tables "formal" tables ( ie referred to as ListObjects in VBA ) or standard ranges ?
- are the tables identical in structure ( have same columns ? )
- is there only one table per sheet ?
- is first header row in each table in A1 on each sheet ?

Please supply 2 typical sample rows of data together with how the user will be adding each field
- entered in a textbox ? selected from a list ? automatic (eg today's date) ? etc
 
Last edited:
Upvote 0
Thank you for your reply.

I would like to attach the file so you can get an idea of how it works..is there any way of doing this?

I have a worksheet called "Tenders". on this sheet there are 5 named tables (table1, table2 etc). All tables have 9 columns and they are placed below each other.

I am constantly updating the data in these tables so I have came up with a Userform rather than inserting, deleting and editing the data manually.

My aim is to click a button that open the userform. On the Userform there will be 5 list boxes acoss a multi page. I have 5 buttons ("delete", "Move To" "Edit" "New")

For the delete button I have a code which works already. I can click on multiple rows in a listbox, click delete, which then deletes the rows of data from my listbox and the same rows from the table on my worksheet.

For the Move To button I would like to select multiple rows in a listbox and click the Move To button, select another listbox and them them rows will be moved to that listbox. The same rows will be moved on the tables on my worksheet.

The New button I will click and Textboxes will pop up were I can enter the data to create a new row. Again updating my table on the worksheet.

The edit button I want to select a row in the listbox click edit and another userform pops up which has textboxes already populated with the data for that row. I can them make changes to the data and enter it back into the listbox and my table on the worksheet is updated.

I know this is a lot of information to take on board but I have tried to explain it the best way I can for you.

Hope this helps and I really appreciate your time and help with this

Thank you very much
 
Upvote 0
Thanks - I will post something for you tomorrow
 
Upvote 0
Thanks!

Have I been clear enough for you to understand how I would like it to work? or could I email you a sample file of the Userform and tables to help you get an idea?
 
Upvote 0
Having seen your file at EF
I wonder why you wouldn't have just one table with an additional column for status ?
Filtering on the status would give what you now have 5 tables for.
 
Upvote 0
The worksheet is for a board report. I need to show current tenders, new tenders, live pricing, submitted tenders and post tenders on the same sheet in separate tables for the report. I am constantly moving this data from table to table and editing it so I thought a userform would be a simple way as I can select multiple rows and moved them about or edit them with a click of a button. Also a few other people use this sheet a lot and I would rather have it set up so they couldn't change the formatting etc on the worksheet.
 
Upvote 0
Looks like you are already receiving good help over at the other forum.
 
Upvote 0
Looks like you are already receiving good help over at the other forum.

Yes @Yongle, Thank you for taking the time to reply to me, it's much appreciated.

Is there a way which I can sort the order of the rows in a table by dragging and dropping within the listbox?

Thanks
 
Upvote 0
Cross posted https://www.excelforum.com/excel-pr...serform-and-update-tables-on-a-worksheet.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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