![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#5
|
|||
|
|||
|
Code:
Private Sub OKButton_Click()
Dim oTbl As Word.Table
Dim oRow As Row
Dim oRng As Word.Range
Select Case True
Case DescriptionBox = vbNullString
MsgBox "You must enter a description"
Case Not IsDate(DateBox)
MsgBox "You must enter a valid date."
Case PriorityCombo = vbNullString
MsgBox "You must select the priority."
Case Else
Set oTbl = ActiveDocument.Tables(1)
Set oRow = oTbl.Rows.Add
oRow.Cells(1).Range.Text = DescriptionBox.Text
oRow.Cells(2).Range.Text = DateBox.Text
oRow.Cells(3).Range.Text = PriorityCombo.Text
Unload Me
End Select
End Sub
|
| Tags |
| bookmark, rows, table |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mouseover cell to indicate mouse pointer location based on Specific Row/Column values | bolandk | Excel | 1 | 05-15-2014 08:22 AM |
| Group Table Rows/Column (like Excel Group) | eoinymc | Word | 1 | 03-11-2014 04:51 AM |
Need help on duplicates in column; deciding which to keep based on other column
|
nwcf | Excel | 3 | 01-31-2014 09:43 AM |
Grouping table rows to prevent individual rows from breaking across pages
|
dennist77 | Word | 1 | 10-29-2013 11:39 PM |
Referencing a Image File and Location
|
matt8445 | PowerPoint | 2 | 11-08-2012 08:23 AM |