Get The Length of data type of excel using visual basic
The length:
Function length(R As Range) As Integer
Dim s As String
s = R.Value
length = Len(s)
End Function
To set format:
Sub Macro1()
Columns("F:F").Select
Selection.NumberFormat = "@"
End Sub
Will, for example, set the format of the cells in column F to text.
--
Gary''s Student
" wrote:
Dear Reader,
I need length of the data type of excel and also want to know the
technique to set the Excel column data type. These things I want with
the help of Visual Basic Code.
If it is possible to do so then please reply me as soon as possible.
Regards,
Sanjay Bol
|