Hi
I have a listbox in a user form populated from a named range called ListData in a worksheet called PropertyData.
Now I want to allow the form user to select a record from the user form and when the OK button is clicked the record is transferred onto a new sheet called 'Log'.
To do this I would prefer to have the record populate the 'Log' worksheet from the top down immediately below the headers. So it needs to insert a blank row beneath the header but only when adding a record so the sheet does not have a blank row showing beneath the header, The ListData is multi column 8 columns in total.
In addition I would like the userform to have a facility to add a new record and to edit an existing record without allowing the user to change the named range in an ad hoc way.
Finally the userform list has a blank last column which needs a text box on the form to allow the user to fill it in with a max say 256 characters before pressing OK.
I already have code to fix the width of the data column on the sheet but need to link the text box to that cloumn/record
If anyone can suggest some code to help I have searched the forum but cannot find anything specific to my reques (that I could adapt with limited knowledge of VBA). Thank you if you can help.
Regards
V
I have a listbox in a user form populated from a named range called ListData in a worksheet called PropertyData.
Now I want to allow the form user to select a record from the user form and when the OK button is clicked the record is transferred onto a new sheet called 'Log'.
To do this I would prefer to have the record populate the 'Log' worksheet from the top down immediately below the headers. So it needs to insert a blank row beneath the header but only when adding a record so the sheet does not have a blank row showing beneath the header, The ListData is multi column 8 columns in total.
In addition I would like the userform to have a facility to add a new record and to edit an existing record without allowing the user to change the named range in an ad hoc way.
Finally the userform list has a blank last column which needs a text box on the form to allow the user to fill it in with a max say 256 characters before pressing OK.
I already have code to fix the width of the data column on the sheet but need to link the text box to that cloumn/record
If anyone can suggest some code to help I have searched the forum but cannot find anything specific to my reques (that I could adapt with limited knowledge of VBA). Thank you if you can help.
Regards
V