New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Macro to delete/add same row on multiple sheets (2)

Macros, VBA, Excel Automation, etc.

Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Wed Apr 20, 2016 4:26 am

Thank you for doing such a good job.

I have some little problem. I have done everything but when I click add a row button. a row created but the sorting list does not work. it locked. i have a data table using conditional formatting. I need to sort data as per requirments. please solve this problem which will be great for me. thanks in advance.

Edit mod : Question related to viewtopic.php?f=3&t=222
  • 0

mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby NoSparks » Wed Apr 20, 2016 10:08 am

If you were to post a sample workbook containing the current code you have, I'm sure people would have a look. As for reading a 4 year old thread, downloading (somebody elses) workbook and studying their problem in order to guess your situation.... not likely to happen.
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Wed Apr 20, 2016 11:52 am

Thanks for the response you did. I added a sample.

This is the worksheet. When I click on the ADD button a row create but it locked the drop list of the header. For this I can't sorting the data through the header. Is it possible that I can add row and short data by header listing.

Thanks again.
  • 0

You do not have the required permissions to view the files attached to this post.
mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby NoSparks » Wed Apr 20, 2016 6:03 pm

Is there a reason for your file being an Excel 97 -2003 .xls when your profile shows you using Excel 2007 ?

If you comment out the .Protect line in the code do things operate the way you would expect ?

'.Protect Password:=PW, UserInterfaceOnly:=True
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Wed Apr 20, 2016 9:56 pm

I made the sample in 2007 but when I need to save the file it said to save in a micro enable workbook. I don't know in what formate I should save. So I save it 97-2003 formate. Sorry to say I am not good at excell but I tried to do some work in excell.
So if I made theUserInterfaceOnly:=False to True the sorting function of header will work.

Thank you for your support and feedback.
  • 0

mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby NoSparks » Wed Apr 20, 2016 11:02 pm

No. I guess that didn't show up too well.
I'm wondering if things will do as expected if the sheets are not protected.
It's the single quote mark (in red) in front of the line I was trying to get you to do.

'.Protect Password:=PW, UserInterfaceOnly:=True

Save the file as macro enabled workbook (.xlsm)
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Re: Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Thu Apr 21, 2016 3:35 am

Thanks again.

Now I saved data in xlsm format . I did according to your message. But it does not work as I wanted. Now the locked sheet became unlock when I click add row. And the header sorting worked.

But I wanted that the sheet remain locked as before if I click add row or delete row and the header sorting like " Name of Employes" and other header (Main Sheet/ Salary & Others) will work.

Could it be done? If it done it will be very helpfull for me. The attachment given below. Here the password is '0'.

Thanking you again.
  • 0

mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Thu Apr 21, 2016 3:49 am

the attachment.
  • 0

mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby mamunges » Thu Apr 21, 2016 3:55 am

Salary-2.xlsm
  • 0

You do not have the required permissions to view the files attached to this post.
mamunges
Rookie
 
Posts: 10
Joined: Apr 18, 2016
Reputation: 0
Excel Version: 2007

Re: Macro to delete/add same row on multiple sheets (2)

Postby NoSparks » Thu Apr 21, 2016 9:20 am

And the header sorting worked.

You now know it's the sheet protection preventing the sorting.

I don't really know how to deal with that. Perhaps something returned by Google will help.
Google is your friend
  • 0

NoSparks
Excel Hobbyist
 
Posts: 637
Joined: May 28, 2014
Reputation: 103
Excel Version: 2010

Next

Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 8 guests