Buttons on works Books

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,285
Office Version
  1. 365
Platform
  1. Windows
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:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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.
 
Upvote 0
Solution
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:
Upvote 0
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 :)
 
Upvote 0

Forum statistics

Threads
1,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top