Sunil,
What error are you getting (as per your post 14)?
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
This is the error message -
Run-time Error "1004":
You typed an invalid name for a sheet or chart. Make sure that:
The name you type does not exceed 31 characters.
Name does not contain any of the following characters: \ / ? * [ ]
You did not leave
Once I hit "Debug" on the error message it highlights this code -
Workbooks(FName).Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = SName
How big is the name of the category? Can you change it so that it doesnt cross 31 characters?
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
I meant the industry name (column X) based on which you name the sheets. Can you check to see if your real data has industry names that dont cross 31 characters, including spaces and it doesnt have characters like \ / ? [ ] *
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Thanks so much Arlette. The Macro works perfect. You made my day!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks