Does anyone have a macro I can use with a button which will export a TAB in excel to a new workbook?
Does anyone have a macro I can use with a button which will export a TAB in excel to a new workbook?
Please Login or Register to view this content.
Please Login or Register to view this content.
Amazing, thank you so much it works perfect.
Is there a way to have the exported tab without the button that I have in the original version?
Please Login or Register to view this content.
Both macros will not run, just the export one. What am I doing wrong?
Re: "Both macros will not run"
Meaning what? Nothing happens or an error message?
When I use the fomula belw an error screen pops up saying compile error
Private Sub CommandButton1_Click()
ThisWorkbook.ActiveSheet.Copy
ActiveSheet.Shapes("CommandButton1").Delete
End Sub
Is the Button Name "CommandButton1"?
I use Form Control Buttons and this works
Please Login or Register to view this content.
I tried this (Excel 2007) with an ActiveX control and it worked.
Obviously, the name needs to be "CommandButton1".
Please Login or Register to view this content.
Last edited by jolivanes; 08-08-2018 at 11:50 AM. Reason: Add info
I keep getting the debugger to come up with the fisrt line highlighted yellow. So the macro can't get past the first line.
I got it to work. Thank you
For someone else searching for a solution for a similar problem, could you be so kind and let us know what you did to make it work.
Thank you very much.
Absolutely. I used this:
Sub export_tab()
ThisWorkbook.ActiveSheet.Copy
ActiveSheet.Shapes("Button 1").Delete
End Sub
The issue I was having was caused by me changing the "Button 1" name to be the name that I used in the button, which was Export TAB. Once I changed it back to "Button 1" it worked.
Thank you for the follow up
Good luck
I would like to take this a little further. Is there something I can add to the macro that it will unlock the protection I have on the sheet and change the links to other excel tabs into the values in the cells.
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks