Is there anyway i can rename every new worksheet i make?
I've come this far as coping a specific Worksheet and then renaming it but i wanna have a option of naming it before it get copied on to the worksheet list and placed at the end?
is there anyway of having a pupop window or something similar asking me what the name of the file i'm coping is going to be?
tbis is what i have so far:
I dont want every sheet I copy to be named "Garbos MALL (2)". I wanna name them my self with a question window.Sub Macro4() ' ' Macro4 Macro ' ' Sheets("Garbos MALL").Select Sheets("Garbos MALL").Copy After:=Sheets(20) Sheets("Garbos MALL (2)").Select Sheets("Garbos MALL (2)").Name = "Garbos MALL (2)" End Sub
You can use an input box to do that. The only issue you'll run into is if the name is invalid it will cause an error. Invalid names would include special characters (like / or \) or would be too long.
Sub mattehalen() Sheets("Garbox MALL").Copy after:=Sheets(20) ActiveSheet.Name = InputBox("What do you want to name your new sheet?") End Sub
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks