vba courses london - change a tab name
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Change A Tab Name on Multiple Workbooks in Different Locations

vba courses london - Change A Tab Name on Multiple Workbooks in Different Locations

resolvedResolved · Low Priority · Version Standard

replyReplyThu 19 Apr 2007, 09:46Delegate Simon said...

Change A Tab Name on Multiple Workbooks in Different Locations

Dear Sir / Madam,

I have 32 Spreadsheets. They are all named differently but all end in the word "Commentary". Each Speadsheet has 2 tabs only. One of these tabs on each spreadsheet is labelled "Period 1".

Each Month I have to go through each Spreadsheet and change the "Period 1" to "Period 2" and so forth...

I am trying to write a procedure which assigned to a Command Button, will automatically change the above on all 32 Spreadsheets.

I managed to find some code on the net which searches my folder and finds all Spreadsheets which contains the word "Commentary", but then I can't manage to write a procedure after this for it to change the relevant tab.

Am I heading in the right direction? Any help or advice on this would be greatfully received and very much appreciated.

Kind Regards,

Simon.

For upcoming training course dates see: Pricing & availability

replyReplyThu 19 Apr 2007, 10:01Trainer Carlos said...

RE: Change A Tab Name on Multiple Workbooks in Different Locatio

Simon

To channge the Tab name on a sheet use the following code:

Open the relevant Workbook then


Sheets("Period 1").Select
ActiveSheet.Name = "Period 2"


This changes the name of the sheet to Period 2

Hope this helps

Regards

Carlos

replyReplyThu 19 Apr 2007, 10:53Delegate Simon said...

RE: Change A Tab Name on Multiple Workbooks in Different Locatio

Hello Carlos,

Thank you very much for the swift reply in response to my question.

This works perfectly.

However could I possibly ask how I can combine this statement to change all of the tabs in my spreadsheets with one click. What I would like is a command button on a new spreadsheet which I click once and then this opens all the spreadsheets say one at a time and changes the tab then saves and closes it.

Apologies for requesting more information. Hope you can help?

Kind Regards,

Simon.

replyReplyThu 19 Apr 2007, 14:35 Edited on Thu 19 Apr 2007, 14:36Trainer Carlos said...

RE: Change A Tab Name on Multiple Workbooks in Different Locatio

Simon

You need to create a Sub routine that contains a loop that opens all the Workbooks one at a time and changes the tab name eg

Create a variable eg Dim MyWorkbook as String

And load into it, the Workbook

 

 

Vba tip:

Count the Rows and Columns in a Selection

If you need to count the number of rows or columns in a worksheet use the following code:

Selection.Rows.Count - Returns the number of rows in the selection

Selection.Columns.Count - Returns the number of columns in the selection

Selection.CurrentRegion.Rows.Count - Returns the number of rows in the current region of the selection

View all VBA hints and tips

forum postHi,

Having just got back into the office after my MS project 2007 course, I've just discovered that I now have 2010 version. Can you remind me of the main differences/things to consider when working in 2010 vs 2007.

Thanks,

Louise

» Forum post: Project 2007 vs 2010


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training