Hi!
I have a problem with macro sheet that duplicates, how can I delete the old one and get back to Feuil8 only, not Feuil8111111.
vba.jpg
Thanks,
JP
Hi!
I have a problem with macro sheet that duplicates, how can I delete the old one and get back to Feuil8 only, not Feuil8111111.
vba.jpg
Thanks,
JP
Instead of a picture, you can attach an example workbook.
To attach a workbook, click the 'Go Advanced' button below and use the paperclip in the toolbar to navigate to your document.
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clickingbelow their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
Thanks! Here we go:
Template_Soumission_v11.xlsm
JP
MaybeUntested. I'm not really strong with French.![]()
Private Sub estimationboite_Click() Dim strName As String Sheets("Estimationboite").Visible = True strName = "Estimation de boite #1" Set ws1 = Worksheets("Estimationboite") ws1.Copy ThisWorkbook.Sheets(Sheets.Count) If WorksheetExists(strName) Then Sheets(strName).Delete Sheets(Sheets.Count).Name = strName Else ActiveSheet.Name = strName End If Sheets("Estimationboite").Visible = False End Sub
Lol no.. the "object sheets" in vba ..
Good! Thanks! Is there an easy way to remove those unused sheet now?
Right click and delete?
Not sure you can remove those imposter 'Thisworkbook' objects.
You may need to transfer all your good sheets and code in to a fresh workbook.
It's very off. They have references like sheet numbers but they actually refer to ThisWorkbook. Hence, you can't unhide them, you can't delete them, and they're not code modules so you can't remove them. Must have been an interesting bit of code.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
If you save it as a .xlsx that should get rid of the "ghosts" of thisworkbook and then you can copy the code back in. Not sure if that is any quicker than copying everything into a new workbook as Andy Pope suggests.
Edit: A look around google suggests saving as xl95 workbook or using a workbook cleaner may also work
Last edited by ragulduy; 03-18-2014 at 12:23 PM.
Replacement workbook attached. Worksheets made visible and copied to a new workbook and saved. Sheets then hidden again.
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks