Command Buttons

  • Thread starter Thread starter Robert Martin
  • Start date Start date
R

Robert Martin

I have a spreadsheet created by someone else.
It has command buttons that are used for adding
values to a list in the sheet.
How can I get to the actual code the button runs?
I've been digging and digging and can't figure out
where the code for the button is.
Any ideas would be greatly appreciated.

I'm using Excel 2007.


TIA

Robert
 
Not sure if this will work for 2007.

For a Forms-type button, right-click the button and select Assign Macro. If
a macro has already been assigned, then touch Edit


For a Controls-type button, right-click the button and pick View Code
 
I can pick view code. And here is what I see

Private Sub CommandButton3_Click()
blnAddJob = True

frmAdd.Caption = "Add Job"
frmAdd.Show

End Sub

I also see

=EMBED("Forms.CommandButton.1","")

when I pick it in developer mode.

I've never worked with something like this before

TIA

Robert
 
If I put excel in Design mode I can see this code

Private Sub CommandButton3_Click()
blnAddJob = True

frmAdd.Caption = "Add Job"
frmAdd.Show

End Sub

What this does is add a item to a list then sort

I also see =EMBED("Forms.CommandButton.1","")

Ant Ideas on where I should look?

TIA

Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top