Where is the code saved in a Form Controls Command Button?

termeric

Active Member
Joined
Jun 21, 2005
Messages
280
Can anyone tell me where the code is saved in a forms controls command button? I'm trying to update a speadsheet someone else made and i cant find the code. i see it run these instructions to delete the command button, but then its doing all sorts of other things too, and thats what i cant find. is there some secret place to hide code?

VBA Code:
Sub Update()
'
' Update Macro
'

'
    ActiveWorkbook.RefreshAll
        ActiveSheet.Shapes.Range(Array("Button 1")).Select
    Selection.Delete
End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
No. If that is the macro assigned to the button, then that is the only code it is calling. Perhaps there is other event code that responds to the refreshall command.
 
Upvote 0
Yes it should, unless there is a COM add-in involved. What exactly are these "all sorts of other things"?
 
Upvote 0
i don't think there is a COM add-in.

after it runs that bit of code it opens a connectiong with a database and downloads some information and then formats it.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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