A
andreas
Dear Experts:
I got a macro that allows me to format the footnote numbers (the ones
at the very bottom of a page) differently from the footnote reference
numbers in the main body text. The macro runs just fine.
There is one thing I would like to get changed/ameliorated.
If the user enters a DECIMAL NUMBER, such as 5,5 or 7,4 (In
Continental EUROPE we use a comma to separate the integer part of a
decimal number from its fractional part) the font size is changed
correctly to that size.
However if the user erroneously enters 5.5 instead of 5,5 it causes
the font size to increase to 55. That is, the user has accidentally
entered a DECIMAL POINT! instead of a comma to separate the integer
part of a decimal number from its fractional part. In CONTINENTAL
EUROPE we use a DECIMAL COMMA instead of a decimal point.
Hence, could somebody help me to re-write this code so that the
entering of a figure with a decimal point (such as 5.5 instead of 5,5)
causes an error and the inputbox re-appears again with the prompt.
Help is much appreciated. Thank you very much in advance.
Best Regards, Andreas
### Code Snippet
bInputValid = False
On Error GoTo Err_Handler1
Set oVar1 = ActiveDocument.Variables("Store1")
Do
FNFS = InputBox("Enter only numeric values between 5 and 12", "Size
of footnote number", oVar1.Value)
If FNFS = vbNullString Then Exit Sub
If IsNumeric(FNFS) Then
If Val(FNFS) >= 5 And Val(FNFS) <= 12 Then
bInputValid = True
End If
End If
Loop Until bInputValid
oVar1.Value = FNFS
I got a macro that allows me to format the footnote numbers (the ones
at the very bottom of a page) differently from the footnote reference
numbers in the main body text. The macro runs just fine.
There is one thing I would like to get changed/ameliorated.
If the user enters a DECIMAL NUMBER, such as 5,5 or 7,4 (In
Continental EUROPE we use a comma to separate the integer part of a
decimal number from its fractional part) the font size is changed
correctly to that size.
However if the user erroneously enters 5.5 instead of 5,5 it causes
the font size to increase to 55. That is, the user has accidentally
entered a DECIMAL POINT! instead of a comma to separate the integer
part of a decimal number from its fractional part. In CONTINENTAL
EUROPE we use a DECIMAL COMMA instead of a decimal point.
Hence, could somebody help me to re-write this code so that the
entering of a figure with a decimal point (such as 5.5 instead of 5,5)
causes an error and the inputbox re-appears again with the prompt.
Help is much appreciated. Thank you very much in advance.
Best Regards, Andreas
### Code Snippet
bInputValid = False
On Error GoTo Err_Handler1
Set oVar1 = ActiveDocument.Variables("Store1")
Do
FNFS = InputBox("Enter only numeric values between 5 and 12", "Size
of footnote number", oVar1.Value)
If FNFS = vbNullString Then Exit Sub
If IsNumeric(FNFS) Then
If Val(FNFS) >= 5 And Val(FNFS) <= 12 Then
bInputValid = True
End If
End If
Loop Until bInputValid
oVar1.Value = FNFS