Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2012, 08:14 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Variable to rename a tab in a worksheet via VBA Windows 7 32bit Variable to rename a tab in a worksheet via VBA Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

If the sheet will always be in the same position then you can use its Index instead of its Name.

eg
Code:
Sheets(1).Select
Even better, if your code is in the same workbook, you can use its codename.

eg
Code:
Sheet1.Select
To see the difference between a sheet's Name and Codename, have a look at the attachment on this thread:
https://www.msofficeforums.com/excel...html#post36290
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Rename a Quick Part sleake Word 14 10-14-2013 09:21 AM
Variable to rename a tab in a worksheet via VBA Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM
Rename Files gsrikanth Excel Programming 3 05-14-2012 03:03 AM
Variable to rename a tab in a worksheet via VBA "Auto-populating" data-worksheet to worksheet. meggenm Excel 4 02-04-2012 02:04 AM
Variable to rename a tab in a worksheet via VBA Rename File cksm4 Word VBA 2 02-25-2011 09:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft