![]() |
|
|
|
#1
|
|||
|
|||
|
The answer to your basic question is no. However, you can add a plain text content control to your cells and use something like the following in the VB Project ThisDocument module:
Code:
Option Explicit
Dim oCCTarget As ContentControl
Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)
Set oCCTarget = ContentControl
End Sub
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Set oCCTarget = Nothing
End Sub
Sub Increment()
If Not oCCTarget Is Nothing Then
Select Case oCCTarget.Range.Text
Case Is = vbNullString
oCCTarget.Range.Text = 1
Case Else
If IsNumeric(oCCTarget.Range.Text) Then
oCCTarget.Range.Text = Val(oCCTarget.Range.Text) + 1
Else
oCCTarget.Range.Text = 1
End If
End Select
End If
lbl_Exit:
Exit Sub
End Sub
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
how can you have the the number of a document sequentially increase - QR Bar code
|
mattyA1977 | Word | 2 | 01-28-2020 05:50 AM |
Looking for a macro to increase a number by 1 in a Word document
|
Olopocram | Word VBA | 15 | 03-07-2018 05:39 PM |
increase the size of the insert hyperlink dialog box
|
mswmacroman | Word | 3 | 02-16-2017 01:44 AM |
| How to increase Spin Button by .1 decimal | KangarooJack | Word VBA | 3 | 12-08-2015 05:50 AM |
Increase serial number for every print
|
atomtm | Word | 1 | 06-15-2012 05:39 AM |