A
andreas
Dear Experts:
For a table macro (see below) I have defined two constants ...
.... strConstantBlue: representing the RGB value for borders,
.... strConstantBlue_2: representing the RGB value for background
pattern color.
I got SEVERAL similar table macros all with the SAME constants, i.e.
.... strConstantBlue and
.... strConstantBlue_2.
How can I set NEW values for these two constants in all the affected
macros in one go, using an InputBox?
That is, after entering the new values for the constant
<strConstantBlue>, say (44,33,22), the values for these constants have
to be reset in all user defined table macros. Let's assume the three
macros in question are named "Tbl_Styling_Blue", "Tbl_Styling_Blue_2
and Tbl_Styling_Blue_3.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
_____________________
Code Snippet
_____________________
Sub Tbl_Styling_Blue()
Dim myTable As Word.Table
Dim rng As Word.Range
Dim strConstantBlue As String
strConstantBlue = RGB(79, 129, 189)
Dim strConstantBlue_2 as String
strConstantBlue_2 = RGB(216, 227, 240)
........
Set myTable = Selection.Tables(1)
With myTable.rows(1)
..Borders(wdBorderTop).LineStyle = wdLineStyleSingle
..Borders(wdBorderTop).LineWidth = wdLineWidth050pt
..Borders(wdBorderTop).Color = strConstantBlue
End With
With myTable.rows.Last
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = strConstantBlue_2
End With
End With
...............................
For a table macro (see below) I have defined two constants ...
.... strConstantBlue: representing the RGB value for borders,
.... strConstantBlue_2: representing the RGB value for background
pattern color.
I got SEVERAL similar table macros all with the SAME constants, i.e.
.... strConstantBlue and
.... strConstantBlue_2.
How can I set NEW values for these two constants in all the affected
macros in one go, using an InputBox?
That is, after entering the new values for the constant
<strConstantBlue>, say (44,33,22), the values for these constants have
to be reset in all user defined table macros. Let's assume the three
macros in question are named "Tbl_Styling_Blue", "Tbl_Styling_Blue_2
and Tbl_Styling_Blue_3.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
_____________________
Code Snippet
_____________________
Sub Tbl_Styling_Blue()
Dim myTable As Word.Table
Dim rng As Word.Range
Dim strConstantBlue As String
strConstantBlue = RGB(79, 129, 189)
Dim strConstantBlue_2 as String
strConstantBlue_2 = RGB(216, 227, 240)
........
Set myTable = Selection.Tables(1)
With myTable.rows(1)
..Borders(wdBorderTop).LineStyle = wdLineStyleSingle
..Borders(wdBorderTop).LineWidth = wdLineWidth050pt
..Borders(wdBorderTop).Color = strConstantBlue
End With
With myTable.rows.Last
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = strConstantBlue_2
End With
End With
...............................