A
Ac-Deucy
I have some VBA macro code below for Word 2003 (not the entire subroutine).
The ActiveDocument.Variable("Document Number") is defined earlier in another
subroutine, and the user is prompted for it, among other document variables.
Unfortunately, if the user leaves it blank, the macro below gives the Run
Time Error 5825; debug shows that processing stops at the line
If VProcNum = ""
VProcNum is not NULL, ISERROR of ISEMPTY. How can I fix the macro and
prevent getting this error message?
THANKS!
here's the macro...
Sub ManualTitle()
'
' ManualTitle Macro
'
Dim VProcNum
'
' Create variable for Procedure Number; if it is empty, warn the user
'
Set VProcNum = ActiveDocument.Variables("Document Number")
If VProcNum = "" Then
Style = vbOKOnly + vbInformation + vbDefaultButton1
Response = MsgBox("Without a Document Number, some header variables
will not be populated ", Style, "No Document Number")
End If
The ActiveDocument.Variable("Document Number") is defined earlier in another
subroutine, and the user is prompted for it, among other document variables.
Unfortunately, if the user leaves it blank, the macro below gives the Run
Time Error 5825; debug shows that processing stops at the line
If VProcNum = ""
VProcNum is not NULL, ISERROR of ISEMPTY. How can I fix the macro and
prevent getting this error message?
THANKS!
here's the macro...
Sub ManualTitle()
'
' ManualTitle Macro
'
Dim VProcNum
'
' Create variable for Procedure Number; if it is empty, warn the user
'
Set VProcNum = ActiveDocument.Variables("Document Number")
If VProcNum = "" Then
Style = vbOKOnly + vbInformation + vbDefaultButton1
Response = MsgBox("Without a Document Number, some header variables
will not be populated ", Style, "No Document Number")
End If