G
Greg Maxey
Hi,
I might be wrapping myself around an axle here but I am trying to figure out
how to make the defualt text displayed in a input box match the last input
entered.
In my AutoNew macro, I have the following:
Dim oForm As Document
Dim SN As String
Set oForm = ActiveDocument
SN = InputBox("Enter student's name", "SN", " ")
oForm.Variables("SN").Value = SN
This provides a blank space to fill in a name to set a document varialbe.
In my AutoOpen macro, I have the following:
Sub AutoOpen()
Dim oForm As Document
Dim SN As String
Dim UpdateSN As VbMsgBoxResult
Set oForm = ActiveDocument
UpdateSN = MsgBox("Do you want to change or update the student's name?",
vbYesNo)
If UpdateSN = vbYes Then
SN = InputBox("Enter changes or updates to student's name", "SN", " ")
oForm.Variables("SN").Value = SN
End If
I am trying to get the student's name to appear as the defualt if the user
choose to update or change the students name. I can't figure out what needs
to go between the " ". It tried & SN & but that returned & SN &.
Can this be done?
I might be wrapping myself around an axle here but I am trying to figure out
how to make the defualt text displayed in a input box match the last input
entered.
In my AutoNew macro, I have the following:
Dim oForm As Document
Dim SN As String
Set oForm = ActiveDocument
SN = InputBox("Enter student's name", "SN", " ")
oForm.Variables("SN").Value = SN
This provides a blank space to fill in a name to set a document varialbe.
In my AutoOpen macro, I have the following:
Sub AutoOpen()
Dim oForm As Document
Dim SN As String
Dim UpdateSN As VbMsgBoxResult
Set oForm = ActiveDocument
UpdateSN = MsgBox("Do you want to change or update the student's name?",
vbYesNo)
If UpdateSN = vbYes Then
SN = InputBox("Enter changes or updates to student's name", "SN", " ")
oForm.Variables("SN").Value = SN
End If
I am trying to get the student's name to appear as the defualt if the user
choose to update or change the students name. I can't figure out what needs
to go between the " ". It tried & SN & but that returned & SN &.
Can this be done?