ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Which form control do i need to do this? (https://www.excelbanter.com/excel-programming/394626-form-control-do-i-need-do.html)

Keith74

Which form control do i need to do this?
 
Hi All

I have a list of data with various columns, two of which the user
needs to be able to edit the displayed data. Additionally the user
need to be able to make a selection from the displayed data, so these
rows can have some further processing later on. The closest i know is
the listview control but so far i haven't been able to work out a way
to make any of the data in the column editable.
Any advice on how to do this or which control i should be using would
be greatly appreciated.

Thanks

Keith


Tom Ogilvy

Which form control do i need to do this?
 
The textbox control is the closest to what you want. You will have to use
several controls to get all the functionality you want.

Here is a start:


XL97: How to Use a UserForm for Entering Data (Q161514)
http://support.microsoft.com/?id=161514

XL2000: How to Use a UserForm for Entering Data (Q213749)
http://support.microsoft.com/?id=213749

http://j-walk.com/ss/excel/tips/tip84.htm

http://www.contextures.on.ca/xlUserForm01.html

Basically you have to write your own code to provide the functionality you
describe.



--
Regards,
Tom Ogilvy


"Keith74" wrote:

Hi All

I have a list of data with various columns, two of which the user
needs to be able to edit the displayed data. Additionally the user
need to be able to make a selection from the displayed data, so these
rows can have some further processing later on. The closest i know is
the listview control but so far i haven't been able to work out a way
to make any of the data in the column editable.
Any advice on how to do this or which control i should be using would
be greatly appreciated.

Thanks

Keith



Keith74

Which form control do i need to do this?
 
Hi Tom

Thanks for the reply. I should have mentioned that the list is of
unknown size, its the result of a sql query. While it would be
possible to create a user form that could go through the records
returned by the query by cycling through a collection and displaying
the results in textboxes I would prefer (and more importantly, my boss
definately prefers :) to use an approach that displays the results in
one go on a single form. Or have i got hold of the wrong end of the
stick here?

cheers

Keith



Tom Ogilvy

Which form control do i need to do this?
 
You can put the Office Web Components (spreadsheet control) on a userform and
populate it. (or just use a spreadsheet in excel itself).

Updating the database would be require you to detect the changes and send
the update commands to the database. It wouldn't be a live two way
connection.

I am sure there is such a control, but I don't think it is shipped with
office.
A grid control or data control possibly from VB 6.

--
Regards,
Tom Ogilvy



"Keith74" wrote:

Hi Tom

Thanks for the reply. I should have mentioned that the list is of
unknown size, its the result of a sql query. While it would be
possible to create a user form that could go through the records
returned by the query by cycling through a collection and displaying
the results in textboxes I would prefer (and more importantly, my boss
definately prefers :) to use an approach that displays the results in
one go on a single form. Or have i got hold of the wrong end of the
stick here?

cheers

Keith




Keith74

Which form control do i need to do this?
 
Hi

For the benefit of anyone who runs a search and finds this. The
eventually solution i came to was to include some textboxs on the form
under the listview control that would be populated with the values of
the corresponding selected listview item. The user can then make their
changes and the textboxes copy their data back onto the listview.

Keith




All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com