Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Redefining the UsedRange of a Worksheet

I have a For Each Loop that looks at cells of a worksheet based on it
UsedRange.

For Each cell in Worksheet.Used Range

Next

I want to be able to allow the user to enter in column and row
adjustement that will redefine the used range. Say for example the
UsedRange is A1:C90. And the user chooses Row 1 and Column 1. Then
the redefined UsedRange would be B2:C90. And how would you pass
multiple constraints on rows and columns to this UsedRange? Similar
to entering columns and rows to be repeated in the page setup of
Excel. The user could enter the rows and column using the RefEdit
box. The user could use the control key to ente multiple constraints
in teh Ref Edit box. I would want to pass these multiple constraints
to a routine which redefines the used range used in the For Loop
above.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Redefining the UsedRange of a Worksheet

You don't redefine the usedrange. It is a read only property

set rng = Activesheet.Range(Userform1.Refedit1.Text)
set rng1 = intersect(Activesheet.Usedrange,rng.EntireRow)

might be applicable to what you want to do.

--
Regards,
Tom Ogilvy

"ExcelMonkey" wrote in message
m...
I have a For Each Loop that looks at cells of a worksheet based on it
UsedRange.

For Each cell in Worksheet.Used Range

Next

I want to be able to allow the user to enter in column and row
adjustement that will redefine the used range. Say for example the
UsedRange is A1:C90. And the user chooses Row 1 and Column 1. Then
the redefined UsedRange would be B2:C90. And how would you pass
multiple constraints on rows and columns to this UsedRange? Similar
to entering columns and rows to be repeated in the page setup of
Excel. The user could enter the rows and column using the RefEdit
box. The user could use the control key to ente multiple constraints
in teh Ref Edit box. I would want to pass these multiple constraints
to a routine which redefines the used range used in the For Loop
above.

Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redefining the $ icons format todd Excel Worksheet Functions 5 September 6th 08 11:10 PM
Why is worksheet.usedrange empty? Sara Excel Worksheet Functions 2 August 24th 07 03:38 PM
Redefining a new Range area - Thanks Nick Hodge and Norman Paul Silverman Excel Programming 0 September 14th 04 11:45 AM
Redefining a new Range area Paul Silverman Excel Programming 2 September 12th 04 12:02 PM
Redefining Styles Grant Reid Excel Programming 1 July 19th 04 02:10 PM


All times are GMT +1. The time now is 11:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"