我的代码:
Sub something()
field = InputBox("Please provide the field name")
ActiveCell.FormulaR1C1 = "=""[""" & Chr(34) & field & Chr(34) & """]=""&RC[-2]&RC[-1]"
End Sub
其中:
RC[-2]
是具有值Closed Fund
RC[-1]
是具有值or
field
输入为Name
我得到了什么:
[“姓名”] =封闭式基金或
我想要的是什么:
[姓名] =封闭式基金或
所以我尝试修改我的代码:
ActiveCell.FormulaR1C1 = "=""[""" & field & """]=""&RC[-2]&RC[-1]"
但我得到了
运行时错误'1004': 应用程序定义的或对象定义的错误`
如果问题尚未明确,请在下方发表评论。
答案 0 :(得分:1)
使用此公式:
' Initial read '
bytesRead = postData.Read(buffer, 0, buffer.Length)
' Read if there are bytes to be read '
While bytesRead <> 0
' Write the current bytes out of the buffer '
requestStream.Write(buffer, 0, bytesRead)
' Read some more '
bytesRead = postData.Read(buffer, 0, buffer.Length)
End While