VBA hast to two ways of reading the value of a
result1 = UserForm1.TextBox1.Value result2 = UserForm1.TextBox1.Text
.Text will always return a string, but what exactly is going on with
.Value? Since the content of a textbox is (presumably) a string it would just returns a string as well. And according to my tests it doesn’t matter if I declare the result variable as variant, string or integer etc.
So why exactly are there two and which one should be used? Or is this just a reminisce left behind for compatibility issues etc.?
There is a reference for .text and .value, but it didn’t really help me to understand the issue. The reference is for Access and I’m actually use it with Excel but I assume it doesn’t matter.
Not sure if this isn’t rather a question for stackoverflow, but to me it seem to fit better in here (since it’s not about an actual problem with a block of code)