Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range question
Hi there,
I'd like to seperate a range to n different ranges then pass these ranges as parameters to a function in Visual Basic separately. I use: Set myRange = Excel.Range(OldRange(1, 1), OldRange(99, 1)) to make a new range "myRange", which has the first 100 value in old range "OldRange" It works fine in VBA, but in VB it is failed. Any suggestions? Thanks, Lee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range question
Try using
Set myRange = OldRange(1, 1).Resize(100) -- Regards Juan Pablo González "Lee dengo" wrote in message ... Hi there, I'd like to seperate a range to n different ranges then pass these ranges as parameters to a function in Visual Basic separately. I use: Set myRange = Excel.Range(OldRange(1, 1), OldRange(99, 1)) to make a new range "myRange", which has the first 100 value in old range "OldRange" It works fine in VBA, but in VB it is failed. Any suggestions? Thanks, Lee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range question
use
Set myRange = Excel.Range(Cells(1, 1), Cells(99, 1)) Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Lee dengo" wrote in message ... Hi there, I'd like to seperate a range to n different ranges then pass these ranges as parameters to a function in Visual Basic separately. I use: Set myRange = Excel.Range(OldRange(1, 1), OldRange(99, 1)) to make a new range "myRange", which has the first 100 value in old range "OldRange" It works fine in VBA, but in VB it is failed. Any suggestions? Thanks, Lee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Range Question | Excel Discussion (Misc queries) | |||
Range question in '97 | Excel Discussion (Misc queries) | |||
Used Range Question | Excel Programming | |||
Range Question | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |