ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form & combo box question (https://www.excelbanter.com/excel-programming/312741-form-combo-box-question.html)

Peter[_28_]

Form & combo box question
 
Hi,

I have a form that adds info to a number of cells in the next free row
of a spreadsheet. (Which works thanks to a number of people who have
helped me here)

I would like to create another form that would be able to select a
particular row (by selecting one a cell in column A by its unique
entry) and having completed the form, add the data to empty cells in
that row by means of a command button.

I can format a combo box to display the unique entries in the cells of
column A, but cannot work out how to get the data written to the
unused cells - grateful for any help/pointers/suggestions.


--
Cheers

Peter

Remove the INVALID to reply

Bob Phillips[_6_]

Form & combo box question
 
Peter,

Not the answer to your question, but have you looked at DataForm, it allows
managing a dataset very easily.

--

HTH

RP

"Peter" wrote in message
...
Hi,

I have a form that adds info to a number of cells in the next free row
of a spreadsheet. (Which works thanks to a number of people who have
helped me here)

I would like to create another form that would be able to select a
particular row (by selecting one a cell in column A by its unique
entry) and having completed the form, add the data to empty cells in
that row by means of a command button.

I can format a combo box to display the unique entries in the cells of
column A, but cannot work out how to get the data written to the
unused cells - grateful for any help/pointers/suggestions.


--
Cheers

Peter

Remove the INVALID to reply




Peter[_28_]

Form & combo box question
 
On Wed, 6 Oct 2004 23:41:13 +0100, "Bob Phillips"
wrote:

Peter,

Not the answer to your question, but have you looked at DataForm, it allows
managing a dataset very easily.


Hi Bob,

Yes, I've used Data|Form previously, but in this instance I need to
enter some data in a form and have that data entered into an existing
row in a spreadsheet

i.e. Cells S1:S7 already have data in them. My form would select row 7
by virtue of the unique reference in cell S1 and the data in my form
would then be added to cells S8:S15.


--
Cheers

Peter

Remove the INVALID to reply

David Adamson[_4_]

Form & combo box question
 
Peter,

I can't remeber who developed this originally but it was an update function
that saved me.

I have mucked around with the original code.

All that happens in this is once you load in the data record you want, then
add the new data (or change existing data) and then when activated the code
determines if the staff names exists and then adds or replaces the data.


Sub StaffDetialsUpdate()
Dim rng As Range
Dim idex As Long

'determines if the staffname alread exists in the list
If Staff.StaffNames.ListIndex = -1 Then
'if the staff name doesn't exist in the list then tell them to use the add
fucntion
MsgBox "This is a new entry - try ADD"
Else
'get the staff name
idex = Staff.StaffNames.ListIndex
'find range for staff names in database
Set rng = Worksheets("staff database").Range("A1")
Set rng = rng(Staff.StaffNames.List(idex, 1))
'rng for data to be posted from which enterypoints in the Staff form
rng(1, 2).Value = Staff.Proposed.Value
rng(1, 3).Value = Staff.Title.Text
'could use a loop depending on names
End if

End Sub







"Peter" wrote in message
...
On Wed, 6 Oct 2004 23:41:13 +0100, "Bob Phillips"
wrote:

Peter,

Not the answer to your question, but have you looked at DataForm, it
allows
managing a dataset very easily.


Hi Bob,

Yes, I've used Data|Form previously, but in this instance I need to
enter some data in a form and have that data entered into an existing
row in a spreadsheet

i.e. Cells S1:S7 already have data in them. My form would select row 7
by virtue of the unique reference in cell S1 and the data in my form
would then be added to cells S8:S15.


--
Cheers

Peter

Remove the INVALID to reply





All times are GMT +1. The time now is 04:53 AM.

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