Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Run a macro using a command button

I have created a macro using the Macro Recorder.
I have a command button and I want to run the macro (which is names
DATASORT) when I click the button.

Please advise how to make this work.

Thanks in advance,
Travis
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Run a macro using a command button

This will depend on the type of command button you created. Right-click
your command button. If there is an option to "Assign Macro", then that's
how you do it. If not, then click "View Code"

Enter this text.

Call <your macro name, no brackets


HTH,
Paul

--

"Tdahlman" wrote in message
...
I have created a macro using the Macro Recorder.
I have a command button and I want to run the macro (which is names
DATASORT) when I click the button.

Please advise how to make this work.

Thanks in advance,
Travis



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Run a macro using a command button

Go to "View" & "Toolbars". Show the forms toolbar.

Click the "button" button. (I know it doesn't make sense, but if you hover
your cursor over, it will say "button")

You'll get a cursor where you can drag & drop a button.

Once you have the button, right click & choose "assign macro".

"Tdahlman" wrote:

I have created a macro using the Macro Recorder.
I have a command button and I want to run the macro (which is names
DATASORT) when I click the button.

Please advise how to make this work.

Thanks in advance,
Travis

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Run a macro using a command button

hi
on the toolbox toolbar, chick design mode. the icon looks like a protractor
with ruller and pencil. in design mode right click the button. from the
popup, click view code. add this......
Private Sub CommandButton1_Click()
call DATASORT
End Sub
close the vb window.
if you need to relocate or resize the button, do so now.
click design mode icon again to exit design mode.
done. button is live.

Regards
FSt1
"Tdahlman" wrote:

I have created a macro using the Macro Recorder.
I have a command button and I want to run the macro (which is names
DATASORT) when I click the button.

Please advise how to make this work.

Thanks in advance,
Travis

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Run a macro using a command button



FSt1 wrote:

hi
on the toolbox toolbar, chick design mode.

--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Run a macro using a command button

hi
2002
on the menu bar...
toolcustomizetoolbarscheck control toolbox

regards
FSt1

"Bob I" wrote:



FSt1 wrote:

hi
on the toolbox toolbar, chick design mode.

--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Run a macro using a command button

You missed it! You typed "chick design mode".
-------------------

--

"FSt1" wrote in message
...
hi
2002
on the menu bar...
toolcustomizetoolbarscheck control toolbox

regards
FSt1

"Bob I" wrote:



FSt1 wrote:

hi
on the toolbox toolbar, chick design mode.

--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Run a macro using a command button

so i can't spell. sigh


"PCLIVE" wrote:

You missed it! You typed "chick design mode".
-------------------

--

"FSt1" wrote in message
...
hi
2002
on the menu bar...
toolcustomizetoolbarscheck control toolbox

regards
FSt1

"Bob I" wrote:



FSt1 wrote:

hi
on the toolbox toolbar, chick design mode.
--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Run a macro using a command button

It's just funny. Wouldn't be great to have a "chick design mode" in Excel.
;-)

--

"FSt1" wrote in message
...
so i can't spell. sigh


"PCLIVE" wrote:

You missed it! You typed "chick design mode".
-------------------

--

"FSt1" wrote in message
...
hi
2002
on the menu bar...
toolcustomizetoolbarscheck control toolbox

regards
FSt1

"Bob I" wrote:



FSt1 wrote:

hi
on the toolbox toolbar, chick design mode.
--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)







  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Run a macro using a command button

Not to worry, please review for humor aspect!

FSt1 wrote:

so i can't spell. sigh


"PCLIVE" wrote:


You missed it! You typed "chick design mode".
-------------------

--

"FSt1" wrote in message
...

hi
2002
on the menu bar...
toolcustomizetoolbarscheck control toolbox

regards
FSt1

"Bob I" wrote:



FSt1 wrote:


hi
on the toolbox toolbar, chick design mode.

--------------------------^^^^^^^^^^^^^^^^^
What version you got, and where can I get one?! ;-)






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you remove a macro command button? Dave Rowe Excel Discussion (Misc queries) 1 July 25th 07 04:16 AM
Command Button to run a Macro Mark Allen Excel Worksheet Functions 2 June 4th 07 04:24 PM
Command Button for Macro on a Toolbar Office Junior[_2_] Excel Discussion (Misc queries) 7 May 12th 07 04:48 PM
Run Macro from Command Button [email protected] Excel Discussion (Misc queries) 1 April 23rd 07 04:36 PM
Destroy command button with a Macro? grasping@straws Excel Discussion (Misc queries) 3 December 22nd 04 02:30 PM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"