Sort in Shared workbook

G

Giri

Hi,

I have a shared workbook. This workbook contains macros.
These macros can be run in a shared workbook & cannot be
viewed/edited. This is fine. The problem is that in my
macro i am selecting a particular row & sorting it. When
the macro is run in the unshared mode it works fine and
the text row is sorted. When the workbook is in shared
mode, i get an error as "1004: This operation requires the
merged cells to be of identical size". I observed that
when a workbook is shared, all rows & columns in a
worksheet are default set as merged in format cells though
an actual merge does not exist when i view the same in the
unshared mode.
1. What change in code can i do in the macro so that i can
sort a particular row in a shared workbook?
2. Is there any other way i can achieve the sort (i cannot
do the sort prior to sharing the file because the data in
the row is dynamic and needs to be sorted when needed)

Any help in this regard is highly appreciated. Thank You.

Regards,
Giri
 
F

Frank Kabel

Hi
AFAIK there's probably no solution for this in a shared workbook. They
have many restrictions and this is one of them
 
D

Dave Peterson

I could sort a (nice) list in a shared workbook using xl2002.

But if my list weren't nice, I could get that message.

I put some test data in A1:I26.

I merged cells: A7:d7 and A14:D14.

I shared my workbook.

I couldn't A1:I26.

But if I wanted to sort H1:I26 (way away from the merged cells), then it blew
up, too!

When I did it manually, I selected H1:I26 and Data|sort. As soon as I clicked
on Sort, xl selected all the rows in my selection--even though I didn't want it
to.

So my bet is you have merged cells in the same rows, but outside the range you
wanted to sort. But shared workbooks won't let you be that specific with your
selection.

It wants to sort everything in all the columns in all those rows.

So be careful--you may end up sorting more stuff than you want--if you fix those
merged cells.
 

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