Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: andrum94 Profile
 | Femeie 25 ani Galati cauta Barbat 27 - 80 ani |
|
TRaP
Moderator
Inregistrat: acum 6 ani
Postari: 795
|
|
For some reason I want to know the total width of 5 columns in a range. This could easily be calculated by summing up their widths manually, sure. But I might need to do this again. And again.
Find width of selected columns (letting VBA sum up each column's width):
Sub Find_Col_Widths()
Dim i As Integer Dim s As Double s = 0 For i = 1 To Selection.Columns.Count s = s + Selection.Columns(i).ColumnWidth Next i
MsgBox s
End Sub |
Find height of selected rows (letting VBA sum up each row's height):
Sub Find_Row_Height()
Dim i As Integer Dim s As Double s = 0 For i = 1 To Selection.Rows.Count s = s + Selection.Rows(i).RowHeight Next i
MsgBox s
End Sub |
|
|
pus acum 4 ani |
|