Vb Script For Calling Data From Excel Database 追蹤

0
Avatar
Legacy Poster

I have a weight scale attached to this computer. The goal is to use the scale to create the weight (Net_Weight) on the label.

I have the scale connected as a shared data source. The scale works without issue and I can get the software to recognize the weight; that works without issue.... my issue appears to be with the script. I have a multi-line expression for the NET WEIGHT.

 

 

 

'Automatically called whenever the value of the data source is needed.

 

'Set the Value property to set the value of this data source.

 

 

 

Value = "2.00"

 

i=0
k=1
while i=0
  k=k+1
  If Sheet1.Range("A" & CStr(k)).Value = Value Then
     i=1
     msgbox Sheet1.Range("D" & CStr(k)).Value
  End If
Wend

 

 

 

 

Anyone have an idea what the error is in this expression?

1 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

I'm not sure what your Sheet1.Range() expression is supposed to be exactly.  If you are trying to reference a field in BarTender's database connection then you use the below syntax:

 

Example: Field("Sheet1$.Net Weight")

登入寫評論。