Buttons on works Books

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,245
Good Afternoon,
I am trying to make some changes to an old work book. It has some buttons that are slightly different to anything I have come across before.

I am used to buttons that have a macro assigned to them, however these buttons are all triggered by cmd_Click events on the work sheets. for example....

Code:
Private Sub CmdIndPool_Click()
IndPool
End Sub
This works when the excel book is saved as 97-2003 but when saving in a modern format I lose the click function.

Secondly, I am unable to amend any of the buttons on the sheet. As far as I can tell all protection is removed/off and I do not have any right click options to move, delete or rename these buttons.

any help would be appreciated.

note: using office 365 (Excel 2019)
 
Last edited:

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,542
Office Version
365
Platform
Windows
Sounds like they are ActiveX controls. On the Developer tab select Design Mode & you should then be able to select them.
I would recommend deleting them & replacing them with either Form Control buttons, or shapes.
 

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,245
thanks fluff, You are right, in a round about way I am now able to amend the buttons.

it looks like on the lasts version the buttons names have change which caused the click events never to get called.
I will work through them and replace with the more familiar method.

I have noticed as few of the 'calls' pass through some additional information.


Private Sub CmdDraw_Click()
Call Draw(No_Teams)
End Sub


Just generally, why might this call be made in this manner? What effect does the addition of (no_teams) have?

Edit...
I might have misundertood what was happening...the sub is actually called
Sub Draw(No_Teams)

I have never seen anything inside the brackets so would still appreciate a brief explaination if possible :)
 
Last edited:

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,245
Thanks for link.
So its just an alternative to using a global variable?

It's strange, 15 years ago I put Expert in Excel on my CV. since then the more i've learned the more ive realised how little i Know :)
 

Forum statistics

Threads
1,089,270
Messages
5,407,304
Members
403,132
Latest member
Black_Mamba_1666

This Week's Hot Topics

Top