Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a Range of cells in VBA
Hello,
I keep having problem with the range() method in VBA. While it seems t be a straightforward method, I cannot apply it with consistent success Even worse, I trigger the command the same way, but sometimes it work fine while other times I kept getting the "select method of range clas failed". For example, I created a button that had only these tw lines: sheet9.activate sheet9.range("a10:e15").select These two lines worked fine, but I don't understand why I had t activate the sheet since I already specify the sheet to look for in m range() method. Even worse, when I tried to use the cells() method to specify th range: sheet9.activate sheet9.range(cells(10,1),cells(15,5)).select the abovementioned error occur. I have no idea why the failure or ho to fix the problem. I just don't understand. Every single book I hav talks about the range method as though it's the simplest method ther is (that's what I thought too). I would truly appreciate if anybody can explain this to me -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for Selecting Cells within a Range | Excel Worksheet Functions | |||
Selecting a range of cells in a macro | Excel Discussion (Misc queries) | |||
Selecting a range of cells, how to ? | Excel Worksheet Functions | |||
Range selecting cells | Excel Discussion (Misc queries) | |||
Selecting a range of cells | Excel Programming |