Can a form update a database?

S

Sherry

I need to create a conference call agenda/meeting minutes template. On it
I'd like to use check boxes to note who of the invitees showed up. I'd like
to be able to get a listing of all the people (who may or may not be invited
to all meetings) and the dates they attended. Can a form in Excel populate a
database or could the form populate another Excel file? I'm real stupid
about how to do things like this - does anybody have advice or maybe even a
simple example?

Thanks!
 
D

Dave Peterson

I'd put the checkboxes in column A (say A1:A20) and link each checkbox to the
cell underneath the checkbox. (And format the cell as ";;;" without the
quotes--so it looks pretty.)

Put the names in B1:B20
and put the date of the meeting in C1

Then after you've checked all the boxes, you could run a macro:

Option Explicit
Sub testme01()

Dim myCell As Range
Dim myRng As Range
Dim LogWks As Worksheet
Dim oRow As Long
Dim MeetingDate As Range

Set LogWks = Worksheets("sheet2")
With LogWks
oRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With

With Worksheets("sheet1")
Set MeetingDate = .Range("c1")
Set myRng = .Range("a1:a20")
For Each myCell In myRng.Cells
If myCell = True Then
With LogWks.Cells(oRow, 1)
.Value = myCell.Offset(0, 1).Value
With .Offset(0, 1)
.Value = MeetingDate.Value
.NumberFormat = "mm/dd/yyyy"
End With
oRow = oRow + 1
End With
End If
Next myCell
End With

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you like the idea, but don't like the code:

Apply data|filter|autofilter to your linkedcell range. Filter on True and then
just copy|paste the names where you like them.

I used the checkboxes from the forms toolbar. When I wanted to reset them to
unchecked, I just selected that range and hit edit|clear|Contents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top