CompressionRatio = CInt(LabelForeColor.Caption)
I am not sure LabelForeColor is label or not.
I think it should be "Me.LabelForeColor.Caption" if it is on the user form.
Sorry that was a typo!
CompressionRatio = CInt(LabelCompRat.Caption)
OK. Then I think "CInt(Me.LabelCompRat.Caption)" work for you. Please try it.
yes that did work thanks! Can you explain what Me does? I looked it up on the Help guide but I don't really understand.
1 of 1 people found this helpful
Me means User Form. So Me.Label1 means user form's object.
For example, if you put object to display, then you can call it ThisDisplay.Lavel1 by VBA.
ThisDisplay is used for display's object.
On the other hand, currently you are using User Form. So I though "Me" is needed.
Though I checked and found that without Me, it works fine on User Form.
Anyway, I am glad to hear now your code works.
Sometimes you just need to talk about it to someone else to get another perspective and find the problem
This can be us, no worries!
Glad you found it and have a nice day,