E
Eric Burkholder
I have two questions. First I am creating a document for bid specifications
for a piece of equipment. I have the document filled out and have several
user input points. Some of the data points I want to have only my company
fill out while having a vendor fill out the remaining. Is this possible?
Second I have two dropdown points
bkFacility - has 14 plant locations ex Burlington, WI, Dolton, IL, etc..
Upon selecting the facility name I want aset of lines for the address. I was
trying to do this in a Select Case. I have had no luck. Currently the
document displays "Error! No document variable supplied. There are three
variables vStreetAddress, vCityState & vPlantEng. Code below:
Sub Address()
Dim strStreetAddress As String
Dim strCityState As String
Dim strPlantEng As String
Dim oVars As Word.Variables
Set oVars = ActiveDocument.Variables
'
Select Case bkFacility.Value
Case "Burlington, WI"
strStreetAddress = "815 S. McHenry Street"
strCityState = "Burlington, WI 53105"
strPlantEng = "George Koontz"
Case "Dolton, IL"
strStreetAddress = "13850 Cottage Groove Ave."
strCityState = "Dolton, IL 60419"
strPlantEng = "Ed Sayers"
End Select
oVars("vStreetAddress").Value = strStreetAddress
oVars("vCItyState").Value = strCityState
oVars("vPlantEng").Value = strPlantEng
Set oVars = Nothing
End Sub
Second dropdown bkPressure lets user select either 75 or 100. Based on this
it will set three other variables vLoPressure, vMidPressure & vHiPressure at
determined values. Code below:
Sub Pressure()
Dim strLoPressure As String
Dim strMidPressure As String
Dim strHiPressure As String
Dim oVars As Word.Variables
Set oVars = ActiveDocument.Variables
'
Select Case bkPressure
Case "75"
strLoPressure = 55
strMidPressure = 65
strHiPressure = 75
Case "100"
strLoPressure = 80
strMidPressure = 90
strHiPressure = 100
End Select
oVars("vLoPressure").Value = strLoPressure
oVars("vMidPressure").Value = strMidPressure
oVars("vHiPressure").Value = strHiPressure
Set oVars = Nothing
End Sub
for a piece of equipment. I have the document filled out and have several
user input points. Some of the data points I want to have only my company
fill out while having a vendor fill out the remaining. Is this possible?
Second I have two dropdown points
bkFacility - has 14 plant locations ex Burlington, WI, Dolton, IL, etc..
Upon selecting the facility name I want aset of lines for the address. I was
trying to do this in a Select Case. I have had no luck. Currently the
document displays "Error! No document variable supplied. There are three
variables vStreetAddress, vCityState & vPlantEng. Code below:
Sub Address()
Dim strStreetAddress As String
Dim strCityState As String
Dim strPlantEng As String
Dim oVars As Word.Variables
Set oVars = ActiveDocument.Variables
'
Select Case bkFacility.Value
Case "Burlington, WI"
strStreetAddress = "815 S. McHenry Street"
strCityState = "Burlington, WI 53105"
strPlantEng = "George Koontz"
Case "Dolton, IL"
strStreetAddress = "13850 Cottage Groove Ave."
strCityState = "Dolton, IL 60419"
strPlantEng = "Ed Sayers"
End Select
oVars("vStreetAddress").Value = strStreetAddress
oVars("vCItyState").Value = strCityState
oVars("vPlantEng").Value = strPlantEng
Set oVars = Nothing
End Sub
Second dropdown bkPressure lets user select either 75 or 100. Based on this
it will set three other variables vLoPressure, vMidPressure & vHiPressure at
determined values. Code below:
Sub Pressure()
Dim strLoPressure As String
Dim strMidPressure As String
Dim strHiPressure As String
Dim oVars As Word.Variables
Set oVars = ActiveDocument.Variables
'
Select Case bkPressure
Case "75"
strLoPressure = 55
strMidPressure = 65
strHiPressure = 75
Case "100"
strLoPressure = 80
strMidPressure = 90
strHiPressure = 100
End Select
oVars("vLoPressure").Value = strLoPressure
oVars("vMidPressure").Value = strMidPressure
oVars("vHiPressure").Value = strHiPressure
Set oVars = Nothing
End Sub