I'm trying to figure out how to calculate the character length of a string entered through an input box. so if the input is "ab" i want to have '2' and if its "ah4ifd" i want to have '6'. Any easy code to do this?
I'm trying to figure out how to calculate the character length of a string entered through an input box. so if the input is "ab" i want to have '2' and if its "ah4ifd" i want to have '6'. Any easy code to do this?
The Len function will do that.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Try this:
![]()
Sub FindLen() Dim x As Variant x = InputBox("Enter Data ") MsgBox ("Length is :- " & Len(x)) End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks