Excel 里面的visual basic编辑函数
我写了个函数,代码如下(方法比较笨,不要深究),在表格中应用的时候总是提示“赋值号左边的函数必须返回变体或调用对象”,请问哪里错了?代码:FunctionEnthalpy...
我写了个函数,代码如下(方法比较笨,不要深究),在表格中应用的时候总是提示“赋值号左边的函数必须返回变体或调用对象”,请问哪里错了?
代码:
Function Enthalpy_NH3_Satish(T, x) As Double
m1 = 0
m2 = 0
m3 = 0
m4 = 0
m5 = 0
m6 = 0
m7 = 1
m8 = 1
m9 = 2
m10 = 3
m11 = 5
m12 = 5
m13 = 5
m14 = 6
m15 = 6
m16 = 8
n1 = 1
n2 = 4
n3 = 8
n4 = 9
n5 = 12
n6 = 14
n7 = 0
n8 = 1
n9 = 1
n10 = 3
n11 = 3
n12 = 4
n13 = 5
n14 = 2
n15 = 4
n16 = 0
a1 = -7.6108
a2 = 25.6935
a3 = -247.092
a4 = 325.952
a5 = -158.854
a6 = 61.9084
a7 = 14.1314
a8 = 1.18167
a9 = 2.84179
a10 = 7.41609
a11 = 891.844
a12 = -1613.09
a13 = 622.106
a14 = -207.588
a15 = -6.87393
a16 = 3.50716
Enthalpy_NH3_Satish(T, x) = 100 * (a1 * ((T / 273.16 - 1) ^ (m1)) * (x ^ (n1)) + a2 * ((T / 273.16 - 1) ^ (m2)) * (x ^ (n2)) + a3 * ((T / 273.16 - 1) ^ (m3)) * (x ^ (n3)) + a4 * ((T / 273.16 - 1) ^ (m4)) * (x ^ (n4)) + a5 * ((T / 273.16 - 1) ^ (m5)) * (x ^ (n5)) + a6 * ((T / 273.16 - 1) ^ (m6)) * (x ^ (n6)) + a7 * ((T / 273.16 - 1) ^ (m7)) * (x ^ (n7)) + a8 * ((T / 273.16 - 1) ^ (m8)) * (x ^ (n8)) + a9 * ((T / 273.16 - 1) ^ (m9)) * (x ^ (n9)) + a10 * ((T / 273.16 - 1) ^ (m10)) * (x ^ (n10)) + a11 * ((T / 273.16 - 1) ^ (m11)) * (x ^ (n11)) + a12 * ((T / 273.16 - 1) ^ (m12)) * (x ^ (n12)) + a13 * ((T / 273.16 - 1) ^ (m13)) * (x ^ (n13)) + a14 * ((T / 273.16 - 1) ^ (m14)) * (x ^ (n14)) + a15 * ((T / 273.16 - 1) ^ (m15)) * (x ^ (n15)) + a16 * ((T / 273.16 - 1) ^ (m16)) * (x ^ (n16)))
End Function 展开
代码:
Function Enthalpy_NH3_Satish(T, x) As Double
m1 = 0
m2 = 0
m3 = 0
m4 = 0
m5 = 0
m6 = 0
m7 = 1
m8 = 1
m9 = 2
m10 = 3
m11 = 5
m12 = 5
m13 = 5
m14 = 6
m15 = 6
m16 = 8
n1 = 1
n2 = 4
n3 = 8
n4 = 9
n5 = 12
n6 = 14
n7 = 0
n8 = 1
n9 = 1
n10 = 3
n11 = 3
n12 = 4
n13 = 5
n14 = 2
n15 = 4
n16 = 0
a1 = -7.6108
a2 = 25.6935
a3 = -247.092
a4 = 325.952
a5 = -158.854
a6 = 61.9084
a7 = 14.1314
a8 = 1.18167
a9 = 2.84179
a10 = 7.41609
a11 = 891.844
a12 = -1613.09
a13 = 622.106
a14 = -207.588
a15 = -6.87393
a16 = 3.50716
Enthalpy_NH3_Satish(T, x) = 100 * (a1 * ((T / 273.16 - 1) ^ (m1)) * (x ^ (n1)) + a2 * ((T / 273.16 - 1) ^ (m2)) * (x ^ (n2)) + a3 * ((T / 273.16 - 1) ^ (m3)) * (x ^ (n3)) + a4 * ((T / 273.16 - 1) ^ (m4)) * (x ^ (n4)) + a5 * ((T / 273.16 - 1) ^ (m5)) * (x ^ (n5)) + a6 * ((T / 273.16 - 1) ^ (m6)) * (x ^ (n6)) + a7 * ((T / 273.16 - 1) ^ (m7)) * (x ^ (n7)) + a8 * ((T / 273.16 - 1) ^ (m8)) * (x ^ (n8)) + a9 * ((T / 273.16 - 1) ^ (m9)) * (x ^ (n9)) + a10 * ((T / 273.16 - 1) ^ (m10)) * (x ^ (n10)) + a11 * ((T / 273.16 - 1) ^ (m11)) * (x ^ (n11)) + a12 * ((T / 273.16 - 1) ^ (m12)) * (x ^ (n12)) + a13 * ((T / 273.16 - 1) ^ (m13)) * (x ^ (n13)) + a14 * ((T / 273.16 - 1) ^ (m14)) * (x ^ (n14)) + a15 * ((T / 273.16 - 1) ^ (m15)) * (x ^ (n15)) + a16 * ((T / 273.16 - 1) ^ (m16)) * (x ^ (n16)))
End Function 展开
展开全部
Function Enthalpy_NH3_Satish(T, x) As Double
m1 = 0
m2 = 0
m3 = 0
m4 = 0
m5 = 0
m6 = 0
m7 = 1
m8 = 1
m9 = 2
m10 = 3
m11 = 5
m12 = 5
m13 = 5
m14 = 6
m15 = 6
m16 = 8
n1 = 1
n2 = 4
n3 = 8
n4 = 9
n5 = 12
n6 = 14
n7 = 0
n8 = 1
n9 = 1
n10 = 3
n11 = 3
n12 = 4
n13 = 5
n14 = 2
n15 = 4
n16 = 0
a1 = -7.6108
a2 = 25.6935
a3 = -247.092
a4 = 325.952
a5 = -158.854
a6 = 61.9084
a7 = 14.1314
a8 = 1.18167
a9 = 2.84179
a10 = 7.41609
a11 = 891.844
a12 = -1613.09
a13 = 622.106
a14 = -207.588
a15 = -6.87393
a16 = 3.50716
Enthalpy_NH3_Satish = 100 * (a1 * ((T / 273.16 - 1) ^ (m1)) * (x ^ (n1)) + a2 * ((T / 273.16 - 1) ^ (m2)) * (x ^ (n2)) + a3 * ((T / 273.16 - 1) ^ (m3)) * (x ^ (n3)) + a4 * ((T / 273.16 - 1) ^ (m4)) * (x ^ (n4)) + a5 * ((T / 273.16 - 1) ^ (m5)) * (x ^ (n5)) + a6 * ((T / 273.16 - 1) ^ (m6)) * (x ^ (n6)) + a7 * ((T / 273.16 - 1) ^ (m7)) * (x ^ (n7)) + a8 * ((T / 273.16 - 1) ^ (m8)) * (x ^ (n8)) + a9 * ((T / 273.16 - 1) ^ (m9)) * (x ^ (n9)) + a10 * ((T / 273.16 - 1) ^ (m10)) * (x ^ (n10)) + a11 * ((T / 273.16 - 1) ^ (m11)) * (x ^ (n11)) + a12 * ((T / 273.16 - 1) ^ (m12)) * (x ^ (n12)) + a13 * ((T / 273.16 - 1) ^ (m13)) * (x ^ (n13)) + a14 * ((T / 273.16 - 1) ^ (m14)) * (x ^ (n14)) + a15 * ((T / 273.16 - 1) ^ (m15)) * (x ^ (n15)) + a16 * ((T / 273.16 - 1) ^ (m16)) * (x ^ (n16)))
End Function
网易云信
2023-12-06 广告
2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询