Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
use Long rather than Integer in the variable declaration
On 15 Maj, 10:44, FARAZ QURESHI wrote: ThanxJarek! XClent! Never had the idea of using Cells().Address! "JarekKujawa" wrote: use this macro: Sub cus() Dim min_row As Integer Dim rows_count As Integer Dim min_col As Integer Dim cols_count As Integer Dim Borders As String min_row = Selection.Row rows_count = Selection.Rows.Count min_col = Selection.Column cols_count = Selection.Columns.Count Borders = Cells(min_row, min_col).Address & "," & Cells(min_row, min_col + cols_count - 1).Address & "," & Cells(min_row + rows_count - 1, min_col).Address & "," & Cells(min_row + rows_count - 1, min_col + cols_count - 1).Address MsgBox "The active borders are " & Borders End Sub On 15 Maj, 08:52, FARAZ QURESHI wrote: I have a selected range, say X5:AC99. What piece of code would return a msgbox: "The active range borders a $X$5, $AC$5, $X$99 & $AC$99"- Ukryj cytowany tekst - - Pokaż cytowany tekst - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Borders for range | Excel Discussion (Misc queries) | |||
Sorting a range loses formatted borders | Excel Discussion (Misc queries) | |||
Find cells without borders | Excel Discussion (Misc queries) | |||
find last cell in range with data, display cell address | Excel Worksheet Functions | |||
Find a Cell Value In a Range | Excel Worksheet Functions |