ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command Buttons (https://www.excelbanter.com/excel-programming/405437-command-buttons.html)

Robert Martin[_2_]

Command Buttons
 
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


Gary''s Student

Command Buttons
 
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
--
Gary''s Student - gsnu2007c


"Robert Martin" wrote:

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



Robert Martin[_2_]

Command Buttons
 
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


"Gary''s Student" wrote in message
...
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
--
Gary''s Student - gsnu2007c


"Robert Martin" wrote:

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



Robert Martin[_2_]

Command Buttons
 
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


"Gary''s Student" wrote in message
...
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
--
Gary''s Student - gsnu2007c


"Robert Martin" wrote:

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




All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com