Use this:

 

Sub SelectRange()

    

    Dim WksSheet As Range

    Dim rngRange As Range

    Dim rngCell  As Range

    

    Set rngRange = Sheet1.Range("A1").CurrentRegion

    

    For Each rngCell In rngRange.Columns(1).Cells

        ThisWorkbook.Worksheets(rngCell.Value).Activate

        Range(rngCell.Offset(, 1).Value).Select

    Next rngCell

    

    

End Sub

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Avinash
Sent: 05 July 2012 10:48
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ help regarding range selection from worksheet

 

Hi all,

 

i want help regarding range selection from worksheet.

 

i have created 1 macro to select specific range from sheet and for that
matter i have used below mentioned code

 

Sheets("sheet1").Select

ActiveSheet.Range("C7:BS37").Select

 

 

my macro should work on range which i have mentioned in the worksheet not in
macro module because if the range gets change i have to make correction in
my macro code

 

but instead of writing this code in to the macro i want something like this 

 

all macro related things are there in the settings sheet and 

 

macro should capture like

 

 


Sheet Name

Defined Range


Sheet1

C7:BS37


Sheet2

C8:BS37


Sheet3

C9:BS37


Sheet4

C10:BS37

 

 

and it should use range from worksheet not from macro module i hope u
understand what i am trying to tell u guys.

 

please help me on this

 

Regards,

 

Avinash

 

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com
 
To unsubscribe, send a blank email to
excel-macros+unsubscr...@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com

Reply via email to