Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Expend Range Using Macro
I would like to use macro to auto select my range of data, say A1:M50
which is expendable or contractible. What command should I include in the macro? Many thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Expend Range Using Macro
Something like this ? ...........
'----------------------------------------- Sub test() Dim MyRange As Range Dim Rw1 As Long Dim Col1 As Integer Dim Rw2 As Long Dim Col2 As Integer '-------------------------- Rw1 = 1 ' Row 1 Col1 = 1 ' Column 1 Rw2 = 50 ' Row 50 Col2 = 13 'Column M Set MyRange = ActiveSheet.Range(Cells(Rw1, Col1), Cells(Rw2 Col2)) MyRange.Select End Sub '---------------------------------------- -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Expend Range Using Macro
Thanks BrianB for the help, but it does not seems to work for me, mayb
I did posted my problems incorrectly or not clearly. What I actually want is if the range is to be expended to A1:M70 fro A1:M50, the macro will automatically select the new range -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
Auto Range Select | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
In VB, get Auto Filter Range | Excel Programming | |||
Macro to input formula in range based on another range | Excel Programming |