Excel Worksheet saving of Ranges ...

R

RV

Hi,

I am struggling to find out the way to get the selected range on all
the worksheet of workbook when the workbook is opened using some APIs
in VBA. What I mean is:

1. Create a new workbook say having three worksheets (Sheet1, Sheet2,
Sheet3)
2. Goto Sheet1 and select range : A1: A10
3. Goto Sheet2 and select range : B1: B10
4. Goto Sheet3 and select range : C1: C10
5. Now Save and close the workbook.
6. Reopen the workbook
7. If I switch between the sheets I can see the selected range at the
time of closing the workbook.
8. So if there a way by which I can get all these ranges when I open
the workbook.

Please help.

Thanks and With Warm Regards,

-Rahul Vakil
--
 
J

Jim Cone

RV,
There is only one selection recognized by Excel and that is the
selection in the active window.
So you must activate each sheet and then read the selection address
for that particular sheet.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"RV"
wrote in message
Hi,
I am struggling to find out the way to get the selected range on all
the worksheet of workbook when the workbook is opened using some APIs
in VBA. What I mean is:

1. Create a new workbook say having three worksheets (Sheet1, Sheet2,
Sheet3)
2. Goto Sheet1 and select range : A1: A10
3. Goto Sheet2 and select range : B1: B10
4. Goto Sheet3 and select range : C1: C10
5. Now Save and close the workbook.
6. Reopen the workbook
7. If I switch between the sheets I can see the selected range at the
time of closing the workbook.
8. So if there a way by which I can get all these ranges when I open
the workbook.

Please help.

Thanks and With Warm Regards,

-Rahul Vakil
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top