Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
WildGlio
 
Posts: n/a
Default Attaching a macro to a VB button on a form

I have created a macro to select a row, copy it and then paste it below the
copied row. I want to attach this macro to a VB button labelled "Add Row" but
cannot work out how.
  #2   Report Post  
Marc W.
 
Posts: n/a
Default



"WildGlio" wrote:

I have created a macro to select a row, copy it and then paste it below the
copied row. I want to attach this macro to a VB button labelled "Add Row" but
cannot work out how.


Hi,

First off you need to make a "Forms" button not a "Control" button. A macro
can not be assigned to a "Control" button. After you make the button a window
will popup to assign the macro to the button. Just pick your macro from the
list.

Regards,
Marc



  #3   Report Post  
WildGlio
 
Posts: n/a
Default

Many thanks Marc. I had not noticed the difference between the two
Toolbarmenus. I've got that bit working - thanks again.

"Marc W." wrote:



"WildGlio" wrote:

I have created a macro to select a row, copy it and then paste it below the
copied row. I want to attach this macro to a VB button labelled "Add Row" but
cannot work out how.


Hi,

First off you need to make a "Forms" button not a "Control" button. A macro
can not be assigned to a "Control" button. After you make the button a window
will popup to assign the macro to the button. Just pick your macro from the
list.

Regards,
Marc



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
delete a macro button is grayed out. Stan at University of Illinois Excel Worksheet Functions 1 March 10th 05 10:28 PM
how to run macro in userform button khurram saddique Excel Discussion (Misc queries) 2 March 4th 05 12:47 PM
Assigning a macro to a "button" Yvon Excel Discussion (Misc queries) 6 February 8th 05 10:58 PM
How to assign a macro to a commnd button Mickey Blue Eyes Excel Discussion (Misc queries) 2 January 4th 05 02:15 PM
A "previous" button on a user form Anthony Slater Excel Discussion (Misc queries) 3 November 29th 04 05:57 PM


All times are GMT +1. The time now is 05:33 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"