ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   command button (https://www.excelbanter.com/excel-discussion-misc-queries/48920-command-button.html)

abfabrob

command button
 
I want to use a command button to click on it to take mr to a template I have
created. I have read some old questions and replies, so I can get the button
on the page, but I have absolutely no idea how to create or "asign" a macro...

Can anyone help?

Regards,
--
Rob,
Teesside,
UK

Bryan Hessey


To insert a button, select View, Toolbars, Control Toolbox,
on the Toolbox select the first icon ('Design Mode') which now becomes
'Exit Design Mode'

Select the button icon and draw a button on the sheet, rightmouse the
button and View Code.

Enter your required code (copy from a macro etc)

Exit Design mode when finished.

To create a macro, select Tools, Macro, Record New Macro, and select a
name, do the actions you want the macro to record, then end the
recording.

Tools, Macro, Macros, select your macro and 'Edit' should give you
enough to work on.


abfabrob Wrote:
I want to use a command button to click on it to take mr to a template I
have
created. I have read some old questions and replies, so I can get the
button
on the page, but I have absolutely no idea how to create or "asign" a
macro...

Can anyone help?

Regards,
--
Rob,
Teesside,
UK



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=473718


Bill Martin

abfabrob wrote:
I want to use a command button to click on it to take mr to a template I have
created. I have read some old questions and replies, so I can get the button
on the page, but I have absolutely no idea how to create or "asign" a macro...

Can anyone help?

Regards,


-----------------------

Once you've created the button on the page, right click on it and select "Assign
Macro". That will bring up a list of macros, you select one and click "ok" and
all should be well.

Bill

abfabrob

I can't see a list of macros. But I don't know what one is...
--
Rob,
Teesside,
UK


"Bill Martin" wrote:

abfabrob wrote:
I want to use a command button to click on it to take mr to a template I have
created. I have read some old questions and replies, so I can get the button
on the page, but I have absolutely no idea how to create or "asign" a macro...

Can anyone help?

Regards,


-----------------------

Once you've created the button on the page, right click on it and select "Assign
Macro". That will bring up a list of macros, you select one and click "ok" and
all should be well.

Bill


Bill Martin

abfabrob wrote:
I can't see a list of macros. But I don't know what one is...


------------

Perhaps Bryan can help you. If you don't know what a macro is, then I can't
much help you assign one to a button which is what I thought you asked for.

Bill

Bryan Hessey


. . hopefully 'what one is...' was meant to be 'which one is...'

In Tools, Macro, Macros, you can Run each macro to see which one
performs the required tasks.

After testing I suggest you close the Workbook without saving, and
re-open it to assign the macro.




Bill Martin Wrote:
abfabrob wrote:
I can't see a list of macros. But I don't know what one is...


------------

Perhaps Bryan can help you. If you don't know what a macro is, then I
can't
much help you assign one to a button which is what I thought you asked
for.

Bill



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=473718



All times are GMT +1. The time now is 01:15 PM.

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