I recalled a value from a cell in a worksheet and VBA is telling me that it cannot use it. It automatically renamed it and I don't know why. Here is my code:
'Calculate K factor for fill valve
If valve_type = "Ball" Then K = Worksheets("Sheet1").Cells(1, 3).Value
If valve_type = "Globe" Then K = Worksheets("Sheet1").Cells(2, 3).Value
If valve_type = "Butterfly" Then K = Worksheets("Sheet1").Cells(3, 3).Value
'Calculate headloss in fill valve
hl_fillvalve = K * Colebrook_equation_fillvalve * T_exit_velocity ^ 2 / 2
It renames the 'K' variable to 'K-factor'. I do not have a variable named 'K-factor' anywhere. How can I fix this?
Thanks
Bookmarks