Check boxes
I have 17 check boxes (which I created using the control toolbox) that
are coded similarly to this:
Private Sub CheckBox1_Change()
Range("B4").Select
If CheckBox1.Value = False Then
Range("A1").Select
Else
Call checkBox
End If
End Sub
Sub checkBox()
ProjectID = ActiveCell.Value
ProjectTitle = ActiveCell.Range("B1").Value
ProjectDate = ActiveCell.Range("C1").Value
ProjectColour = ActiveCell.Range("D1").Value
ProjectFile = ActiveCell.Range("E1").Value
ProjectSummary = ActiveCell.Range("F1").Value
Sql = "insert into PROJECT (ID, TITLE, DATE, COLOUR, LINK, SUMMARY)
values ('" & ProjectID & "','" & ProjectTitle & "','" & ProjectDate &
"','" & ProjectColour & "','" & ProjectFile & "','" & ProjectSummary &
"')"
....
<this then has connections to the database and executes the above SQL
query correctly
....
End Sub
Is this what you were asking for?
Tim Williams wrote:
Maybe show your current code? It might be a simple modification of that.
What type of checkboxes are you using?
Tim
"laura56" wrote in message
oups.com...
Hi,
I want to use check boxes to select certain rows in the spreadsheet to
be transferred to the database. After these check boxes are selected,
I then want to use one "update" button to transfer to the database.
Currently, as you select each checkbox that row individually is
transferred. Does anyone know how to combine this using macros? I was
thinking something like a counter, but I am very inexperienced with VBA
so I'm not sure how/if it something like this can be done?
Any help much appreciated.
Thanks
:)
|