LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Visual Basic - Variable Sheet Names

Hi Everyone,

I have a macro that I run on a 2007 workbook that makes a duplicate copy of
the current sheet by hitting a button with the macro associated with it. The
macro runs fine when the sheet is named "Sheet1"; however, once a duplicate
sheet has been created, I need to change the name of that sheet, then when I
go and hit my macro button again, I get an error since I have now renamed
"Sheet1" to something else.

In VB, is there a term that I may use to duplicate the current sheet
selected? I need to have a variable term used instead of the current
"sheet1" that is in my macro.

Thanks for your help as always!

Mark
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
visual basic. find copy row past into new sheet Chuck Excel Worksheet Functions 3 December 17th 07 09:02 PM
Visual Basic osaka78 Excel Discussion (Misc queries) 5 September 17th 07 01:21 PM
Visual Basics - Automating Specific Sheet Names Tenaj Excel Discussion (Misc queries) 9 October 6th 05 01:51 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Micos3 Excel Discussion (Misc queries) 9 June 28th 05 01:41 PM


All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"