Getting the length of a TextBox in VBA...
-
How would I get the length of a textbox using VBA when there is no such code such as:
Dim intIndex, intIndexMax As Integer intIndexMax = txtOutputFilePath.Length // no such thing as txtOutputFilePath.Length For intIndex = intIndexMax To 0 Step -1 // try to find the directory path and separate it from the file name by using InStr to find the last \\ Next
Does anybody have some code to separate the directory path from the directory path and file name combination? Please provide some assistance...
-
How would I get the length of a textbox using VBA when there is no such code such as:
Dim intIndex, intIndexMax As Integer intIndexMax = txtOutputFilePath.Length // no such thing as txtOutputFilePath.Length For intIndex = intIndexMax To 0 Step -1 // try to find the directory path and separate it from the file name by using InStr to find the last \\ Next
Does anybody have some code to separate the directory path from the directory path and file name combination? Please provide some assistance...
Use a ruler? (Or maybe something like txtOutputFilePath.Value.Length)
-
Use a ruler? (Or maybe something like txtOutputFilePath.Value.Length)
I think that I may not have stated my question clearly. What I meant was the length of the string value in the textbox not the width of the actual textbox as an object on the form. I tried to assign the value to a string and to check that but I cannot get the strTextBox.Length value either. Instead, I decided to use the FileDialog Common Dialog control. However, I am having some trouble retrieving values from that control as well. Please see the message above.
-
I think that I may not have stated my question clearly. What I meant was the length of the string value in the textbox not the width of the actual textbox as an object on the form. I tried to assign the value to a string and to check that but I cannot get the strTextBox.Length value either. Instead, I decided to use the FileDialog Common Dialog control. However, I am having some trouble retrieving values from that control as well. Please see the message above.
-
How would I get the length of a textbox using VBA when there is no such code such as:
Dim intIndex, intIndexMax As Integer intIndexMax = txtOutputFilePath.Length // no such thing as txtOutputFilePath.Length For intIndex = intIndexMax To 0 Step -1 // try to find the directory path and separate it from the file name by using InStr to find the last \\ Next
Does anybody have some code to separate the directory path from the directory path and file name combination? Please provide some assistance...