tomsov
New Member
- Joined
- Mar 31, 2017
- Messages
- 24
Hello, I'm using the following code in my userform that isn't working and produces an error "Expected: list seperator or ) ". I would like to pull data from an external workbook based on an internal server to produce a cost based on the part number using vlookup that is to be inserted into a Textbox (called PartCost)
The way I'm trying to use this is thus:
PartCostVar = Application.WorksheetFunction.IfError(Application.VLookup(itemFind, "\\ER_Server\share\Database\ER-Room\[costbook.xlsx]Parts Data"!$A$3:$E$2740),2,FALSE))
If PartCostVar <> "" Then
Me.PartCost = PartCostVar
Else
Me.PartCost = "N/A"
End If
I'm using a similar method for other information that works - but it isn't based on the server so it seems to be the external link that maybe causing the problem (working code
If WorksheetFunction.VLookup(itemFind, Data_Table, 25, False) = "Y" Then
Me.ER_Result = "YES"
Else
Me.ER_Result = "NO"
End If
Thank you!
The way I'm trying to use this is thus:
PartCostVar = Application.WorksheetFunction.IfError(Application.VLookup(itemFind, "\\ER_Server\share\Database\ER-Room\[costbook.xlsx]Parts Data"!$A$3:$E$2740),2,FALSE))
If PartCostVar <> "" Then
Me.PartCost = PartCostVar
Else
Me.PartCost = "N/A"
End If
I'm using a similar method for other information that works - but it isn't based on the server so it seems to be the external link that maybe causing the problem (working code
If WorksheetFunction.VLookup(itemFind, Data_Table, 25, False) = "Y" Then
Me.ER_Result = "YES"
Else
Me.ER_Result = "NO"
End If
Thank you!