Rename worksheet in macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I download a file every day, I have a great macro that does a load of stuff
but have realised one shortcoming.

Every day the original worksheets name tab (business system generated)
includes the date, so it changes its name every day.

When I ask my macro to select the tab and change the name as part of the
required tasks, it will stop dead when tomorrow comes and the name has
changed due to the new date.

I'm an obsolute novice VB editor, but would be grateful if anyone can see a
way around this other than getting IT to remove the date field from the tab
name .
 
You should try and reference the worksheet name tab as ActiveSheet.Name

ActiveSheet.Name = Format(Date, "mmddyy")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top