Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent - Resize(1, 5).Value sets all the cells at once! I had expected it
would only set the first cell. Learn something new every day... :) "Tom Ogilvy" wrote in message ... Public Sub Button_Click() With ActiveSheet.Buttons(Application.Caller) With Cells(.TopLeftCell.Row, .BottomRightCell.Column + 1) .Resize(1,5).Value = "X" End With End With End Sub Was more what I had in mind. -- Regards, Tom Ogilvy Rob van Gelder wrote in message ... Public Sub Button_Click() With ActiveSheet.Buttons(Application.Caller) With Cells(.TopLeftCell.Row, .BottomRightCell.Column + 1) .Value = "X" .AutoFill .Resize(1, 5), xlFillCopy End With End With End Sub "wesandem " wrote in message ... Thanks for the help guys - looks like it's working perfectly now. One more thing I should have asked earlier - what would I change if I want this action to apply to not just the adjacent cell but to the next five cells? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to macro to relative position | Excel Discussion (Misc queries) | |||
Relative position of Employees | Excel Worksheet Functions | |||
Recording new excel macro, relative reference button doesn't show | New Users to Excel | |||
Relative Cell position NOT working with or without macro | Excel Discussion (Misc queries) | |||
relative position in macro | Excel Programming |