LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default button names changed on copied sheet

These damn buttons....

I have a collection of form buttons on sheet. They are all assigned to the same sub(). In that sub() I obtain their name:

Dim button_name As String: button_name = Application.Caller

When I do a copy sheet (leftclick tab, move or copy, x create copy) everything is just fine EXCEPT the buttons have changed their names.

Select Case button_name
Case "Button 2"
row_day = oMyWs.Range("row_day_1").row
Case "Button 3"
row_day = oMyWs.Range("row_day_2").row

The above fails because "Button 2" is now "Button 1". There is no "Button 1" on the source page (probably having been deleted during development)

What gives? Can I fix this or am I doomed.

Thank you.
Excel 2010


 
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
When a sheet is copied, i want also that the Sub's whithin this sheet is copied to the new sheet Luc[_8_] Excel Programming 2 January 12th 10 05:49 AM
The column names (A,B,C, etc...) changed to numbers?????????? Jenner Setting up and Configuration of Excel 1 May 27th 09 06:53 PM
Duplicate names on copied worksheet Pat Conover Links and Linking in Excel 0 March 20th 06 11:36 AM
The columns names on my sheet have changed!! so_moody Excel Discussion (Misc queries) 2 August 15th 05 12:16 PM
names changed somehow choice[_2_] Excel Programming 1 February 5th 05 06:29 AM


All times are GMT +1. The time now is 06:39 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"